So this is the failing command from the build:
g++ -c -o 
/home/wookey/debian/polymake-4.1/build/Opt/apps/common/cpperl/SparseMatrix-2.o 
-MMD -MT 
/home/wookey/debian/polymake-4.1/build/Opt/apps/common/cpperl/SparseMatrix-2.o 
-MF 
/home/wookey/debian/polymake-4.1/build/Opt/apps/common/cpperl/SparseMatrix-2.o.d
 -fPIC -pipe -g -O2 -ftemplate-backtrace-limit=0 
-fdebug-prefix-map=/home/wookey/debian/polymake-4.1=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 
-ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op 
-Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses 
-Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds 
-DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O2 
-DPOLYMAKE_APPNAME=common 
-I/home/wookey/debian/polymake-4.1/include/app-wrappers 
-I/home/wookey/debian/polymake-4.1/include/apps 
-I/home/wookey/debian/polymake-4.1/include/external/permlib 
-I/home/wookey/debian/polymake-4.1/include/external/TOSimplex 
-I/home/wookey/debian/polymake-4.1/include/core-wrappers 
-I/home/wookey/debian/polymake-4.1/include/core 
/home/wookey/debian/polymake-4.1/apps/common/cpperl/generated/SparseMatrix-2.cc 
&& : 'COMPILER_USED=10.2.0'

I found that setting -g1 or -O0 makes it work.
But setting -O1 does not. Nor does changing the -ftemplate-depth=number 
(between 50 and 500)

gcc -E works (if you mkdir -p build/Opt/apps/common/cpperl first)
but
gcc -S ICEs

So essentially building it in two steps: preprocessing to .ii, then building, 
works, but doing it all in one go doesn't.
i.e like this:
g++ -E -o 
/home/wookey/debian/polymake-4.1/build/Opt/apps/common/cpperl/SparseMatrix-2.o 
-MMD -MT 
/home/wookey/debian/polymake-4.1/build/Opt/apps/common/cpperl/SparseMatrix-2.o 
-MF 
/home/wookey/debian/polymake-4.1/build/Opt/apps/common/cpperl/SparseMatrix-2.o.d
 -fPIC -pipe -g -O2 -ftemplate-backtrace-limit=0 
-fdebug-prefix-map=/home/wookey/debian/polymake-4.1=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 
-ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op 
-Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses 
-Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds 
-DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -DPOLYMAKE_APPNAME=common 
-I/home/wookey/debian/polymake-4.1/include/app-wrappers 
-I/home/wookey/debian/polymake-4.1/include/apps 
-I/home/wookey/debian/polymake-4.1/include/external/permlib 
-I/home/wookey/debian/polymake-4.1/include/external/TOSimplex 
-I/home/wookey/debian/polymake-4.1/include/core-wrappers 
-I/home/wookey/debian/polymake-4.1/include/core 
/home/wookey/debian/polymake-4.1/apps/common/cpperl/generated/SparseMatrix-2.cc

g++ -c -o 
/home/wookey/debian/polymake-4.1/build/Opt/apps/common/cpperl/SparseMatrix-2.o  
-fPIC -pipe -g -O2 -ftemplate-backtrace-limit=0 
-fdebug-prefix-map=/home/wookey/debian/polymake-4.1=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++14 
-ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op 
-Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses 
-Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds 
-DPOLYMAKE_WITH_FLINT  -DPOLYMAKE_DEBUG=0 -DNDEBUG -DPOLYMAKE_APPNAME=common 
SparseMatrix-2.ii

Don't know if that helps narrow it down at all? The fact that the 2-stage build 
works seems rather odd to me.

I tried with gcc-snapshot (20201023) and that worked correctly.
so something changed between
g++ (Debian 10.2.0-16) 10.2.0 and
g++ (Debian 20201023-1) 11.0.0 20201023 (experimental) [master revision 
d08d481912b:b3da6ca6235:9e3b9ddb996f18d541a3e03611d46c3a6c0c0b5f]
Is anyone in a position to bisect this so we can work out what fix should be 
backported? Or give me some clues on how to go about that.
Any more debug suggestions?

I have reported this to the ARM compiler team internally too.

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to