Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 659480

Summary: [ICE/7] sys-devel/gcc-7.3.0 with -std=c++17: internal compiler error in /usr/include/glm/gtc/quaternion.hpp
Product: Gentoo Linux Reporter: Cyp <cyp561>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED UPSTREAM    
Severity: normal CC: slyfox
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gcc.gnu.org/PR86353
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 657054    
Attachments: ice.cpp (creduce with grep 'quaternion.*internal compiler error')
ice2.cpp (creduce with grep 'internal compiler error')
ice3.cpp (manually reduced ice2.cpp)

Description Cyp 2018-06-28 12:32:58 UTC
g++-7.3.0 -std=c++17 gives an internal compiler error
g++-7.3.0 -std=c++14 works
g++-6.4.0 -std=c++17 works
g++-6.4.0 -std=c++14 works

Reproducible: Always

Steps to Reproduce:
1. $ g++-7.3.0 -std=c++17 -c -o ouch.o ice.cpp
2. $ g++-7.3.0 -std=c++17 -c -o ouch.o ice2.cpp
3. $ g++-7.3.0 -std=c++17 -c -o ouch.o ice3.cpp
Actual Results:  
ice3.cpp: In function ‘void __static_initialization_and_destruction_0(int, int)’:
ice3.cpp:9:16: internal compiler error: in gimplify_expr, at gimplify.c:12200
 d<3, float> j(1);
                ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.


Expected Results:  
No internal compiler errors.

Reduced with creduce.

ice.cpp only gives an internal compiler error with the "# 7 "/usr/include/glm/gtc/quaternion.hpp" 3" line, and correctly gives sensible error messages without it. It's probably invalid C++, but compiles fine with g++-6.4.0 and/or -std=c++14.

ice2.cpp is probably valid C++.

ice3.cpp is a manually-reduced version of ice2.cpp.
Comment 1 Cyp 2018-06-28 12:36:10 UTC
Created attachment 537528 [details]
ice.cpp (creduce with grep 'quaternion.*internal compiler error')
Comment 2 Cyp 2018-06-28 12:37:12 UTC
Created attachment 537530 [details]
ice2.cpp (creduce with grep 'internal compiler error')
Comment 3 Cyp 2018-06-28 12:38:30 UTC
Created attachment 537532 [details]
ice3.cpp (manually reduced ice2.cpp)
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2018-06-28 21:47:24 UTC
Fails here as well on g++-7.3.0. g++-8.1.0 seems to survive just fine.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2018-06-28 22:40:50 UTC
Filed bug upstream as https://gcc.gnu.org/PR86353
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2018-10-27 21:16:28 UTC
Upstream is not comfortabe backporting the fix to gcc-7.

I'm afraid you'll need to work it around on package level.