public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108930] New: Internal compiler error with -fopenmp (tsubst_omp_for_iterator)
@ 2023-02-24 23:15 michael_greenburg at byu dot edu
  2023-02-24 23:16 ` [Bug c++/108930] " michael_greenburg at byu dot edu
  2023-02-24 23:17 ` michael_greenburg at byu dot edu
  0 siblings, 2 replies; 3+ messages in thread
From: michael_greenburg at byu dot edu @ 2023-02-24 23:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108930

            Bug ID: 108930
           Summary: Internal compiler error with -fopenmp
                    (tsubst_omp_for_iterator)
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michael_greenburg at byu dot edu
  Target Milestone: ---

Created attachment 54533
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54533&action=edit
The source file

GCC VERSION: 12.1.0. The error also occurs with versions 10.2.0, 11.2.0, and
12.2.1; 12.2.1 is the default GCC that comes with Arch, the others I built on
the same system as 12.1.0.

SYSTEM TYPE: Linux x86_64 (RHEL 7.9)

CONFIGURED WITH: /apps/src/gcc/src/gcc-12.1.0/configure
--prefix=/apps/gcc/12.1.0 --with-arch=haswell --with-tune=znver3
--with-fpmath=avx --enable-host-shared --enable-threads --enable-__cxa_atexit
--enable-valgrind-annotations --disable-multilib --with-dwarf2

GCC COMMAND LINE: g++ -std=c++20 -fopenmp -freport-bug -save-temps -Wall
-Wextra trigger_bug.cc

OBSERVED AND EXPECTED BEHAVIOR: I would expect the program to compile and run
successfully (as it does without `-fopenmp`) rather than dying on an internal
compiler error.

I've attached `trigger_bug.cc` (a minimal example) and will also attach the
*.out file that resulted from `-freport-bug` and the *.ii file that resulted
from `-save-temps`.

It seems like this might be related:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105839



COMPILER OUTPUT:
trigger_bug.cc: In instantiation of 'const auto product(std::array<_Tp, _Nm>)
[with T = int; long unsigned int N = 3]':
trigger_bug.cc:39:25:   required from here
trigger_bug.cc:26:9: internal compiler error: in tsubst_omp_for_iterator, at
cp/pt.cc:18126
   26 |         for (auto i=ibegin; i<iend; i++) {
      |         ^~~
0x6ae052 tsubst_omp_for_iterator
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18126
0x6ae052 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:19095
0x6ae052 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
0x8890dc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:19028
0x8890dc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
0x889054 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18476
0x889054 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
0x888e6e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18833
0x888e6e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
0x889054 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18476
0x889054 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
0x8a296d tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:19836
0x8803c3 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:21341
0x888488 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:19491
0x888488 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
0x88bec7 tsubst_init
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:16774
0x88b195 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18643
0x88b195 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
0x889054 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18476
0x889054 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /apps/src/gcc/src/gcc-12.1.0/gcc/cp/pt.cc:18450
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp/ccvkbzHf.out file, please attach this to
your bugreport.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/108930] Internal compiler error with -fopenmp (tsubst_omp_for_iterator)
  2023-02-24 23:15 [Bug c++/108930] New: Internal compiler error with -fopenmp (tsubst_omp_for_iterator) michael_greenburg at byu dot edu
@ 2023-02-24 23:16 ` michael_greenburg at byu dot edu
  2023-02-24 23:17 ` michael_greenburg at byu dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: michael_greenburg at byu dot edu @ 2023-02-24 23:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108930

--- Comment #1 from michael_greenburg at byu dot edu ---
Created attachment 54534
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54534&action=edit
The *.out file from `-freport-bug`

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/108930] Internal compiler error with -fopenmp (tsubst_omp_for_iterator)
  2023-02-24 23:15 [Bug c++/108930] New: Internal compiler error with -fopenmp (tsubst_omp_for_iterator) michael_greenburg at byu dot edu
  2023-02-24 23:16 ` [Bug c++/108930] " michael_greenburg at byu dot edu
@ 2023-02-24 23:17 ` michael_greenburg at byu dot edu
  1 sibling, 0 replies; 3+ messages in thread
From: michael_greenburg at byu dot edu @ 2023-02-24 23:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108930

--- Comment #2 from michael_greenburg at byu dot edu ---
Created attachment 54535
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54535&action=edit
The *.ii file from `-save-temps`

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-24 23:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24 23:15 [Bug c++/108930] New: Internal compiler error with -fopenmp (tsubst_omp_for_iterator) michael_greenburg at byu dot edu
2023-02-24 23:16 ` [Bug c++/108930] " michael_greenburg at byu dot edu
2023-02-24 23:17 ` michael_greenburg at byu dot edu

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).