Bug 1573429
| Summary: | gcc crash when compiling with -mfma | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Developer Toolset | Reporter: | Duncan Muirhead <Duncan.Muirhead> | ||||
| Component: | gcc | Assignee: | Marek Polacek <mpolacek> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Michael Petlan <mpetlan> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | DTS 7.0 RHEL 7 | CC: | jakub, jorton, kanderso, law, mcermak, mnewsome, ohudlick | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | devtoolset-8-gcc-8.1.1-5.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Previously, GCC could crash when vectorizing code using FMA (Fused multiply–add) when processing a ternary operand. This bug has been fixed and the code compiles correctly.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-11-13 08:38:30 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Thanks for the bug report. This fails even with current trunk; I'll reduce and open an upstream PR. Too late for DTS 7. Fixed. Reproduced with devtoolset-7-gcc. Works with devtoolset-8-gcc-8.2.1-3.el8.x86_64. VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3562 |
Created attachment 1429136 [details] preprocessed source /opt/rh/devtoolset-7/root/usr/bin/gcc -std=gnu11 -Wall -g -D_GNU_SOURCE -m64 -fopenmp -mavx2 -O3 -ffast-math -fno-unsafe-math-optimizations -mfma fmabug.c -lm -o fmabugf fmabug.c: In function ‘main’: fmabug.c:63:5: internal compiler error: in compute_live_loop_exits, at tree-ssa-loop-manip.c:229 int main( int argc, char** argv) I wrote a small test program to try to understand why I was getting wrong answers when using the fma() function, with -mfma enabled. I built the program twice, once without -mfma, in which case it compiled and ran fine, and once with when I got the compiler crash above. Version-Release number of selected component (if applicable): /user/dmuir/utils/la/test% /opt/rh/devtoolset-7/root/usr/bin/gcc --version gcc (GCC) 7.2.1 20170829 (Red Hat 7.2.1-1) Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. How reproducible: Compile the program Additional info: