public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
@ 2013-09-28 19:49 reichelt at gcc dot gnu.org
2013-09-30 7:12 ` [Bug c++/58567] " mpolacek at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-09-28 19:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Bug ID: 58567
Summary: [4.8/4.9 Regression] ICE with invalid loop variable in
template using openmp
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet (compiled with "-fopenmp") triggers an ICE
since GCC 4.8.0:
================================================
template<typename T> void foo()
{
#pragma omp parallel for
for (typename T::X i = 0; i < 100; ++i)
;
}
void bar()
{
foo<int>();
}
================================================
bug.cc: In instantiation of 'void foo() [with T = int]':
bug.cc:10:12: required from here
bug.cc:4:22: error: 'int' is not a class, struct, or union type
for (typename T::X i = 0; i < 100; ++i)
^
bug.cc:4:3: internal compiler error: tree check: expected tree that contains
'decl common' structure, have 'error_mark' in tsubst_omp_for_iterator, at
cp/pt.c:12938
for (typename T::X i = 0; i < 100; ++i)
^
0xcdaef7 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
../../gcc/gcc/tree.c:9348
0x5aa6b1 contains_struct_check
../../gcc/gcc/tree.h:2723
0x5aa6b1 tsubst_omp_for_iterator
../../gcc/gcc/cp/pt.c:12938
0x5a55ee tsubst_expr
../../gcc/gcc/cp/pt.c:13481
0x5a43d8 tsubst_expr
../../gcc/gcc/cp/pt.c:13446
0x5a4451 tsubst_expr
../../gcc/gcc/cp/pt.c:13284
0x5a1dcf instantiate_decl(tree_node*, int, bool)
../../gcc/gcc/cp/pt.c:19391
0x5de71f instantiate_pending_templates(int)
../../gcc/gcc/cp/pt.c:19492
0x6198c7 cp_write_global_declarations()
../../gcc/gcc/cp/decl2.c:4060
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
@ 2013-09-30 7:12 ` mpolacek at gcc dot gnu.org
2013-09-30 10:15 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-30 7:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-09-30
CC| |jason at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r188939.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
2013-09-30 7:12 ` [Bug c++/58567] " mpolacek at gcc dot gnu.org
@ 2013-09-30 10:15 ` rguenth at gcc dot gnu.org
2013-10-16 9:51 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-30 10:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
2013-09-30 7:12 ` [Bug c++/58567] " mpolacek at gcc dot gnu.org
2013-09-30 10:15 ` rguenth at gcc dot gnu.org
@ 2013-10-16 9:51 ` jakub at gcc dot gnu.org
2013-11-05 14:43 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16 9:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.2 |4.8.3
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2013-10-16 9:51 ` jakub at gcc dot gnu.org
@ 2013-11-05 14:43 ` rguenth at gcc dot gnu.org
2013-12-04 23:56 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-05 14:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2013-11-05 14:43 ` rguenth at gcc dot gnu.org
@ 2013-12-04 23:56 ` burnus at gcc dot gnu.org
2014-01-03 20:25 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-12-04 23:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Lightly tested patch:
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13037,2 +13037,6 @@ tsubst_omp_for_iterator (tree t, int i, tree declv,
decl = RECUR (decl);
+
+ if (decl == error_mark_node)
+ return;
+
if (init_decl)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2013-12-04 23:56 ` burnus at gcc dot gnu.org
@ 2014-01-03 20:25 ` burnus at gcc dot gnu.org
2014-01-29 18:23 ` [Bug c++/58567] [4.8 " paolo.carlini at oracle dot com
2014-03-01 21:43 ` reichelt at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2014-01-03 20:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Fri Jan 3 20:24:50 2014
New Revision: 206322
URL: http://gcc.gnu.org/viewcvs?rev=206322&root=gcc&view=rev
Log:
2014-01-03 Tobias Burnus <burnus@net-b.de>
PR c++/58567
* pt.c (tsubst_omp_for_iterator): Early return for
* error_mark_node.
2014-01-03 Tobias Burnus <burnus@net-b.de>
PR c++/58567
* g++.dg/gomp/pr58567.C: New.
Added:
trunk/gcc/testsuite/g++.dg/gomp/pr58567.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
` (5 preceding siblings ...)
2014-01-03 20:25 ` burnus at gcc dot gnu.org
@ 2014-01-29 18:23 ` paolo.carlini at oracle dot com
2014-03-01 21:43 ` reichelt at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-29 18:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|4.8.3 |4.9.0
Summary|[4.8/4.9 Regression] ICE |[4.8 Regression] ICE with
|with invalid loop variable |invalid loop variable in
|in template using openmp |template using openmp
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/58567] [4.8 Regression] ICE with invalid loop variable in template using openmp
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
` (6 preceding siblings ...)
2014-01-29 18:23 ` [Bug c++/58567] [4.8 " paolo.carlini at oracle dot com
@ 2014-03-01 21:43 ` reichelt at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-01 21:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58567
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.0 |4.8.3
--- Comment #6 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Now also fixed on the 4.8 branch for 4.8.3.
Probably due to Jason's patch for PR60146.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-01 21:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-28 19:49 [Bug c++/58567] New: [4.8/4.9 Regression] ICE with invalid loop variable in template using openmp reichelt at gcc dot gnu.org
2013-09-30 7:12 ` [Bug c++/58567] " mpolacek at gcc dot gnu.org
2013-09-30 10:15 ` rguenth at gcc dot gnu.org
2013-10-16 9:51 ` jakub at gcc dot gnu.org
2013-11-05 14:43 ` rguenth at gcc dot gnu.org
2013-12-04 23:56 ` burnus at gcc dot gnu.org
2014-01-03 20:25 ` burnus at gcc dot gnu.org
2014-01-29 18:23 ` [Bug c++/58567] [4.8 " paolo.carlini at oracle dot com
2014-03-01 21:43 ` reichelt at gcc dot gnu.org
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).