Firm Bugtracker - cparser
Viewing Issue Advanced Details
176 unknown minor always 2016-05-11 16:50 2017-05-08 16:18
kahlert  
 
normal  
new  
open  
none    
none  
0000176: Undefined reference to '__builtin_*' functions with new gcc versions.
Using 'isnan' from math.h results into a call to __builtin_isnan (isnan is a makro).

In new gcc versions (gcc 6.1.1 20160501) some __builtin_* functions are not available for linking any more, since gcc translates them directly into opcodes.
At least the following functions are affected:
__builtin_isnan
__builtin_isinf_sign
__builtin_isnormal
__builtin_signbit
...


Reproduce:
1. Create a file (test.c) containing

#include <math.h>

double g = 0;

int main() {
    return isnan(g);
}


2. 'gcc test.c' works fine
3. 'cparser test.c' outputs a linker error:

/tmp/05a1m7/a-0-1.o: In function `main':
(.text+0x13): undefined reference to `__builtin_isnan'
collect2: error: ld returned 1 exit status
a.out: error: linker reported an error
jpg file icon turtlezombie.jpg [^] (79,214 bytes) 2017-05-08 16:18
Issue History
2016-05-11 16:50 kahlert New Issue
2016-05-11 17:04 UniQ Note Added: 0000267
2016-08-25 09:04 zwinkau Note Added: 0000272
2017-05-08 16:16 waldgrasgeniesser Note Added: 0000298
2017-05-08 16:18 waldgrasgeniesser File Added: turtlezombie.jpg

Notes
(0000267)
UniQ   
2016-05-11 17:04   
The problem also affects C/gnu99/builtin_nan.c and opt/nans.c of our testsuite.
(0000272)
zwinkau   
2016-08-25 09:04   
Also affects x10i: http://buildbot.info.uni-karlsruhe.de/builders/x10i%20linux%20ia32/builds/578 [^]
(0000298)
waldgrasgeniesser   
2017-05-08 16:16   
I don't care that you broke your elbow.