Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#53368 - [gcc] [gcc5] internal compiler error with -std=c89 -fsanitize=float-divide-by-zero

Attached to Project: Arch Linux
Opened by Max Bruckner (FSMaxB) - Sunday, 19 March 2017, 13:43 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Wednesday, 17 May 2017, 12:01 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I found an internal compiler error in GCC 6 and 5. I am reporting this here and not in the GCC bugzilla, because it says so in the error message.

Output for GCC 5.4.0:

gcc-5 -std=c89 -fsanitize=float-divide-by-zero bug.c -c
bug.c: In function ‘bug’:
bug.c:3:2: internal compiler error: in c_fully_fold_internal, at c-family/c-common.c:1545
int test = (1 / number >= 1);
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
make: *** [Makefile:2: bug] Error 1


Output for GCC 6.0.3:

cc -std=c89 -fsanitize=float-divide-by-zero bug.c -c
bug.c: In function ‘bug’:
bug.c:3:2: internal compiler error: in c_fully_fold_internal, at c/c-fold.c:558
int test = (1 / number >= 1);
^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
make: *** [Makefile:2: bug] Error 1


Additional info:
* gcc-5.4.0 and gcc-6.3.1
* attachment contains C and Makefile to reproduce the problem
* This only happens on i686, I cannot reproduce it on x86_64


Steps to reproduce:
Try to build the attached source file on an i686 system with gcc and the compiler flags '-std=c89 -fsanitize=float-divide-by-zero'.
   bug.c (0.1 KiB)
   Makefile (0.1 KiB)
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Wednesday, 17 May 2017, 12:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  gcc 7.1.1-2
Comment by Max Bruckner (FSMaxB) - Sunday, 19 March 2017, 14:06 GMT

Loading...