public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "freddie at witherden dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95264] New: Infinite Loop When Compiling Templated C++ code at -O1 and above Date: Thu, 21 May 2020 22:08:31 +0000 [thread overview] Message-ID: <bug-95264-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95264 Bug ID: 95264 Summary: Infinite Loop When Compiling Templated C++ code at -O1 and above Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: freddie at witherden dot org Target Milestone: --- Created attachment 48578 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48578&action=edit Preprocessed source. When attempting to compile the header-only C++ application Polyquad (https://github.com/PyFR/Polyquad) with any recent version of GCC at any optimization level, the compiler gets stuck. (And either dies with c++: fatal error: Killed signal terminated program cc1plus or an out of memory error depending on the platform.) This is believed to be an interaction between the Boost bfloat type (an arbitrary precision numerical type) and the Eigen library (a heavily templated matrix library). By comparison, Clang is able to compile the application in a few minutes at any optimization level with memory never peaking above 3-4 GiB. GCC with -O3 -g will happily malloc in excess of 30 GiB before dying (although this can be curtailed somewhat by -fno-var-tracking-assignments). The compiler command (from the uncompressed pre-processed source) is: /usr/libexec/gcc/x86_64-pc-linux-gnu/10.1.0/cc1plus -fpreprocessed main.ii -march=skylake -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -msgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrtm -mhle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1-mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144-mtune=skylake -quiet -dumpbase main.cpp -auxbase-strip CMakeFiles/polyquad.dir/src/main.cpp.o -O3 -Wno-deprecated -std=c++17 -version -fno-var-tracking-assignments-o main.s
next reply other threads:[~2020-05-21 22:08 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-21 22:08 freddie at witherden dot org [this message] 2020-05-22 9:14 ` [Bug c++/95264] " rguenth at gcc dot gnu.org 2020-05-22 9:35 ` rguenth at gcc dot gnu.org 2020-05-22 9:44 ` rguenth at gcc dot gnu.org 2020-05-22 9:55 ` rguenth at gcc dot gnu.org 2020-05-22 10:19 ` rguenth at gcc dot gnu.org 2020-05-22 11:13 ` freddie at witherden dot org 2020-05-22 11:34 ` rguenther at suse dot de 2020-05-22 11:49 ` freddie at witherden dot org 2021-10-02 6:00 ` [Bug ipa/95264] " pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-95264-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).