]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa/106124 - ICE with -fkeep-inline-functions and OpenMP
authorRichard Biener <rguenther@suse.de>
Mon, 27 Mar 2023 14:40:15 +0000 (16:40 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 29 Mar 2023 06:55:34 +0000 (08:55 +0200)
commit36330e2e95564a360e6dbcfb4e7566d5c2177415
tree16ab86a32bcbaf57fecd3210554bfdf3e8577fef
parent8dd57939c20b5e218404a838f514429f8e414dea
ipa/106124 - ICE with -fkeep-inline-functions and OpenMP

The testcases in this bug reveal cases where an early generated
type is collected because it was unused but gets attempted to
be recreated later when a late DIE for a function (an OpenMP
reduction) is created.  That's unexpected and possibly the fault
of OpenMP but the following allows the re-creation of the context
type to succeed.

PR ipa/106124
* dwarf2out.cc (lookup_type_die): Reset TREE_ASM_WRITTEN
so we can re-create the DIE for the type if required.

* g++.dg/gomp/pr106124.C: New testcase.
gcc/dwarf2out.cc
gcc/testsuite/g++.dg/gomp/pr106124.C [new file with mode: 0644]