public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59628] New: ICE with invalid OpenMP "declare reduction" clause
@ 2013-12-30 13:29 reichelt at gcc dot gnu.org
2014-12-12 17:55 ` [Bug c++/59628] " paolo.carlini at oracle dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-12-30 13:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59628
Bug ID: 59628
Summary: ICE with invalid OpenMP "declare 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 since 2013-10-11:
==============================================================
struct A { int i; };
void foo()
{
A a;
#pragma omp declare reduction (+: A: omp_out.i +: omp_in.i)
#pragma omp parallel reduction (+: a)
;
}
==============================================================
bug.cc: In function 'void foo()':
bug.cc:6:51: error: expected primary-expression before ':' token
#pragma omp declare reduction (+: A: omp_out.i +: omp_in.i)
^
bug.cc:6:51: error: expected ')' before ':' token
bug.cc:7:40: internal compiler error: Segmentation fault
#pragma omp parallel reduction (+: a)
^
0xb75baf crash_signal
../../gcc/gcc/toplev.c:336
0x713397 finish_omp_reduction_clause
../../gcc/gcc/cp/semantics.c:5023
0x713397 finish_omp_clauses(tree_node*)
../../gcc/gcc/cp/semantics.c:5751
0x686027 cp_parser_omp_all_clauses
../../gcc/gcc/cp/parser.c:28155
0x513e4e cp_parser_omp_parallel
../../gcc/gcc/cp/parser.c:29603
0x674827 cp_parser_omp_construct
../../gcc/gcc/cp/parser.c:30723
0x674827 cp_parser_pragma
../../gcc/gcc/cp/parser.c:31228
0x67ac2c cp_parser_statement
../../gcc/gcc/cp/parser.c:9433
0x67b5c9 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9740
0x67b73e cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:9694
0x68f15b cp_parser_function_body
../../gcc/gcc/cp/parser.c:18610
0x68f15b cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18646
0x6934fe cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22678
0x694394 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/gcc/cp/parser.c:22590
0x694394 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16588
0x69562f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11200
0x679003 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11081
0x69fcd3 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10978
0x69e9c8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10864
0x6a02ba cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4018
Please submit a full bug report, [etc.]
Jakub, this appeared right after your big OpenMP 4.0 patch
(where "omp declare reduction" was introduced):
2013-10-11 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): Error out for redeclaration of UDRs.
(declare_simd_adjust_this): New function.
(grokfndecl): If "omp declare simd" attribute is present,
call declare_simd_adjust_this if needed and
c_omp_declare_simd_clauses_to_numbers.
[...]
Would you mind having a look?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59628] ICE with invalid OpenMP "declare reduction" clause
2013-12-30 13:29 [Bug c++/59628] New: ICE with invalid OpenMP "declare reduction" clause reichelt at gcc dot gnu.org
@ 2014-12-12 17:55 ` paolo.carlini at oracle dot com
2014-12-12 21:50 ` paolo at gcc dot gnu.org
2014-12-12 21:55 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-12 17:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59628
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-12-12
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Target Milestone|--- |5.0
Ever confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59628] ICE with invalid OpenMP "declare reduction" clause
2013-12-30 13:29 [Bug c++/59628] New: ICE with invalid OpenMP "declare reduction" clause reichelt at gcc dot gnu.org
2014-12-12 17:55 ` [Bug c++/59628] " paolo.carlini at oracle dot com
@ 2014-12-12 21:50 ` paolo at gcc dot gnu.org
2014-12-12 21:55 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-12-12 21:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59628
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Dec 12 21:50:12 2014
New Revision: 218692
URL: https://gcc.gnu.org/viewcvs?rev=218692&root=gcc&view=rev
Log:
/cp
2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59628
* semantics.c (finish_omp_reduction_clause): Early return true
if DECL_SAVED_TREE (id) is NULL_TREE.
/testsuite
2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59628
* g++.dg/gomp/pr59628.C: New.
Added:
trunk/gcc/testsuite/g++.dg/gomp/pr59628.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/59628] ICE with invalid OpenMP "declare reduction" clause
2013-12-30 13:29 [Bug c++/59628] New: ICE with invalid OpenMP "declare reduction" clause reichelt at gcc dot gnu.org
2014-12-12 17:55 ` [Bug c++/59628] " paolo.carlini at oracle dot com
2014-12-12 21:50 ` paolo at gcc dot gnu.org
@ 2014-12-12 21:55 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-12 21:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59628
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 for 5.0.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-12 21:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-30 13:29 [Bug c++/59628] New: ICE with invalid OpenMP "declare reduction" clause reichelt at gcc dot gnu.org
2014-12-12 17:55 ` [Bug c++/59628] " paolo.carlini at oracle dot com
2014-12-12 21:50 ` paolo at gcc dot gnu.org
2014-12-12 21:55 ` 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).