Issue Details (XML | Word | Printable)

Key: PCC-337
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

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

cannot pass long double function argument

Created: 27/Apr/11 05:00 PM   Updated: 29/Apr/11 06:23 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386


 Description  « Hide
The following code example

void foo(long double);

void bar(long double a)
{
        foo(a);
}

fails to compile, producing "line 5: compiler error: Cannot generate code, node 0xbb901800 op FUNARG"

 All   Comments   Change History      Sort Order: Descending order - Click to sort in ascending order
Iain Hibbert added a comment - 29/Apr/11 10:28 AM
Apologies, this was not a pcc issue and can be closed

it was caused by lack of -DGCC_COMPAT when building mkext in the NetBSD build

Iain Hibbert added a comment - 29/Apr/11 10:06 AM
Hm. I have two methods for building pcc

1. via the pcc make system, to get /usr/tools/bin/i486--netbsdelf-pcc, and
    this binary handles the above source just fine

2. via the NetBSD make system, to get /usr/bin/pcc, and the ccom built here
    produces the following output (no args, just the source)

        .text
        .align 4
        .globl bar
        .type bar,@function
bar:
<stdin>, line 5: compiler error: Cannot generate code, node 0xbb9017f0 op FUNARG
0xbb9016fc) CALL, uchar, REG %eax , SU= 0(@REG,,,,,,)
    0xbb901274) ICON $foo, PTR FTN uchar, REG %eax , SU= 0(@REG,,,,,,)
    0xbb9017f0) FUNARG, ldouble, REG %eax , SU= 0(@REG,,,,,,)
        0xbb901848) OREG 8(%ebp), ldouble, REG %eax , SU= 0(@REG,,,,,,)

The second build method does add some other flags (SSP for instance, and -O2) and allows
cross building as part of NetBSD release, will look into that and see if I can find what might
be different..

Anders Magnusson added a comment - 28/Apr/11 04:34 PM
Can you elaborate on this? I have no problem compiling the code above (with any flags).