Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 659480 - [ICE/7] sys-devel/gcc-7.3.0 with -std=c++17: internal compiler error in /usr/include/glm/gtc/quaternion.hpp
Summary: [ICE/7] sys-devel/gcc-7.3.0 with -std=c++17: internal compiler error in /usr/...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR86353
Whiteboard:
Keywords:
Depends on:
Blocks: 657054
  Show dependency tree
 
Reported: 2018-06-28 12:32 UTC by Cyp
Modified: 2018-10-27 21:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ice.cpp (creduce with grep 'quaternion.*internal compiler error') (ice.cpp,565 bytes, text/x-c++src)
2018-06-28 12:36 UTC, Cyp
Details
ice2.cpp (creduce with grep 'internal compiler error') (ice2.cpp,528 bytes, text/x-c++src)
2018-06-28 12:37 UTC, Cyp
Details
ice3.cpp (manually reduced ice2.cpp) (ice3.cpp,244 bytes, text/x-c++src)
2018-06-28 12:38 UTC, Cyp
Details

Note You need to log in before you can comment on or make changes to this bug.
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 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 gentoo-dev 2018-06-28 22:40:50 UTC
Filed bug upstream as https://gcc.gnu.org/PR86353
Comment 6 Sergei Trofimovich 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.