Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000176 [cparser] unknown minor always 2016-05-11 16:50 2017-05-08 16:18
Reporter kahlert View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version
  Product Build
Summary 0000176: Undefined reference to '__builtin_*' functions with new gcc versions.
Description 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
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files jpg file icon turtlezombie.jpg [^] (79,214 bytes) 2017-05-08 16:18

- Relationships

-  Notes
(0000267)
UniQ (developer)
2016-05-11 17:04

The problem also affects C/gnu99/builtin_nan.c and opt/nans.c of our testsuite.
(0000272)
zwinkau (manager)
2016-08-25 09:04

Also affects x10i: http://buildbot.info.uni-karlsruhe.de/builders/x10i%20linux%20ia32/builds/578 [^]
(0000298)
waldgrasgeniesser (reporter)
2017-05-08 16:16

I don't care that you broke your elbow.

- Issue History
Date Modified Username Field Change
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


Mantis 1.1.5[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker