Issue Details (XML | Word | Printable)

Key: PCC-373
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Jonathan Gray
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

long double complex vs long double

Created: 30/Jul/11 10:11 PM   Updated: 31/Jul/11 09:39 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: OpenBSD/i386 -current, pcc cvs


 Description  « Hide
/usr/local/bin/pcc -O2 -pipe -g -I/usr/src/lib/libm/src -I/usr/src/lib/libm/src/ld80 -c /usr/src/lib/libm/src/s_casinl.c -o s_casinl.o
/usr/src/lib/libm/src/s_casinl.c, line 106: operands of *= have incompatible types
/usr/src/lib/libm/src/s_casinl.c, line 107: operands of += have incompatible types

This works fine with at least gcc 4.2.1 and clang svn. Went back a few months in pcc cvs
history and the problem still occurs so it does not appear to be caused by recent changes.

smaller test case:

#include <complex.h>
int
main(void)
{
        long double complex ct = 1;
        long double b = 0.5;

        ct *= b;

        return (0);
}

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 30/Jul/11 10:17 PM
Heh! It's the *= that isn't handled by pcc properly; ct = ct * b works as expected.

Anders Magnusson added a comment - 31/Jul/11 09:39 AM
Fixed now.