The next program is aborted in execution (avr-gcc 4.3.0, -Os): int isinf (double); void abort (void); volatile double x = -1.0/0.0; int main () { if (isinf (x) != isinf (-__builtin_inf ())) abort (); return 0; }
The second comparison argument is evaluated at compile time: -1 value is substituted. This is traditional result for isinf(-Inf). The first call of isinf() is replaced to inline code, which evaluates the -Inf to +1 value. The early avr-gcc versions are fine: the extern isinf() function was called. -- Summary: [avr] 4.3.0: builtin isinf() mismatch to compile-time substitution Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dmixm at marine dot febras dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35509