public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
@ 2013-10-12 21:08 reichelt at gcc dot gnu.org
2013-10-12 21:09 ` [Bug c++/58702] " reichelt at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-12 21:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702
Bug ID: 58702
Summary: [4.9 Regression] ICE with undeclared variable in
OpenMP reduction clause
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
on trunk:
=============================================
void foo()
{
x;
#pragma omp parallel for reduction(+:x)
for (int i = 0; i < 10; ++i) ;
}
=============================================
bug.cc: In function 'void foo()':
bug.cc:3:3: error: 'x' was not declared in this scope
x;
^
bug.cc:4:40: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in finish_omp_reduction_clause, at
cp/semantics.c:4966
#pragma omp parallel for reduction(+:x)
^
0xd14f79 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/gcc/tree.c:9351
0x6df624 tree_class_check
../../gcc/gcc/tree.h:2797
0x6df624 finish_omp_reduction_clause
../../gcc/gcc/cp/semantics.c:4966
0x6df624 finish_omp_clauses(tree_node*)
../../gcc/gcc/cp/semantics.c:5709
0x634b1e cp_omp_split_clauses
../../gcc/gcc/cp/parser.c:28967
0x66873e cp_parser_omp_for
../../gcc/gcc/cp/parser.c:29079
0x668c4b cp_parser_omp_parallel
../../gcc/gcc/cp/parser.c:29259
0x63f221 cp_parser_omp_construct
../../gcc/gcc/cp/parser.c:30380
0x63f221 cp_parser_pragma
../../gcc/gcc/cp/parser.c:30885
0x64555c cp_parser_statement
../../gcc/gcc/cp/parser.c:9297
0x646342 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9604
0x646486 cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:9558
0x659b0b cp_parser_function_body
../../gcc/gcc/cp/parser.c:18401
0x659b0b cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18437
0x65df0f cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22444
0x65ece2 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/gcc/cp/parser.c:22365
0x65ece2 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16412
0x65ff2f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11047
0x643860 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10928
0x66aaae cp_parser_declaration
../../gcc/gcc/cp/parser.c:10825
Please submit a full bug report, [etc.]
The regression was introduced between 2013-10-09 and 2013-10-11.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58702] [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
2013-10-12 21:08 [Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause reichelt at gcc dot gnu.org
@ 2013-10-12 21:09 ` reichelt at gcc dot gnu.org
2013-10-14 9:02 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-12 21:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery,
| |ice-on-invalid-code, openmp
Known to work| |4.8.0
Target Milestone|--- |4.9.0
Known to fail| |4.9.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58702] [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
2013-10-12 21:08 [Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause reichelt at gcc dot gnu.org
2013-10-12 21:09 ` [Bug c++/58702] " reichelt at gcc dot gnu.org
@ 2013-10-14 9:02 ` rguenth at gcc dot gnu.org
2014-01-29 10:38 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-14 9:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58702] [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
2013-10-12 21:08 [Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause reichelt at gcc dot gnu.org
2013-10-12 21:09 ` [Bug c++/58702] " reichelt at gcc dot gnu.org
2013-10-14 9:02 ` rguenth at gcc dot gnu.org
@ 2014-01-29 10:38 ` paolo.carlini at oracle dot com
2014-01-29 13:36 ` paolo at gcc dot gnu.org
2014-01-29 13:37 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-29 10:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-01-29
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Ever confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58702] [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
2013-10-12 21:08 [Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-01-29 10:38 ` paolo.carlini at oracle dot com
@ 2014-01-29 13:36 ` paolo at gcc dot gnu.org
2014-01-29 13:37 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-01-29 13:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed Jan 29 13:36:22 2014
New Revision: 207235
URL: http://gcc.gnu.org/viewcvs?rev=207235&root=gcc&view=rev
Log:
/cp
2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58702
* semantics.c (finish_omp_reduction_clause): Check type for
error_mark_node.
/testsuite
2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58702
* g++.dg/gomp/pr58702.C: New.
Added:
trunk/gcc/testsuite/g++.dg/gomp/pr58702.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58702] [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause
2013-10-12 21:08 [Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-01-29 13:36 ` paolo at gcc dot gnu.org
@ 2014-01-29 13:37 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-29 13:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58702
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Assignee|paolo.carlini at oracle dot com |unassigned at gcc dot gnu.org
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-29 13:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-12 21:08 [Bug c++/58702] New: [4.9 Regression] ICE with undeclared variable in OpenMP reduction clause reichelt at gcc dot gnu.org
2013-10-12 21:09 ` [Bug c++/58702] " reichelt at gcc dot gnu.org
2013-10-14 9:02 ` rguenth at gcc dot gnu.org
2014-01-29 10:38 ` paolo.carlini at oracle dot com
2014-01-29 13:36 ` paolo at gcc dot gnu.org
2014-01-29 13:37 ` paolo.carlini at oracle dot com
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).