public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop
@ 2013-11-10 21:51 reichelt at gcc dot gnu.org
2013-11-10 21:52 ` [Bug c/59073] " reichelt at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-10 21:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Bug ID: 59073
Summary: [4.9 Regression] ICE with missing increment in OpenMP
for-loop
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()
{
int i;
#pragma omp distribute parallel for
for (i = 0; i < 10; i) ;
}
==========================================
bug.c: In function 'foo':
bug.c:5:23: error: invalid increment expression
for (i = 0; i < 10; i) ;
^
bug.c:4:9: internal compiler error: in gimplify_omp_for, at gimplify.c:6899
#pragma omp distribute parallel for
^
0x7ecf0e gimplify_omp_for
../../gcc/gcc/gimplify.c:6899
0x7d9281 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:8188
0x7dd856 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5657
0x7d9e73 gimplify_statement_list
../../gcc/gcc/gimplify.c:1548
0x7d9e73 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:8144
0x7dd856 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5657
0x7de5b4 gimplify_bind_expr
../../gcc/gcc/gimplify.c:1229
0x7da201 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../gcc/gcc/gimplify.c:7926
0x7dd856 gimplify_stmt(tree_node**, gimple_statement_d**)
../../gcc/gcc/gimplify.c:5657
0x7def5e gimplify_body(tree_node*, bool)
../../gcc/gcc/gimplify.c:8836
0x7df4b6 gimplify_function_tree(tree_node*)
../../gcc/gcc/gimplify.c:8974
0x674d17 analyze_function
../../gcc/gcc/cgraphunit.c:638
0x676024 analyze_functions
../../gcc/gcc/cgraphunit.c:1005
0x677535 finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2263
0x53ef53 c_write_global_declarations()
../../gcc/gcc/c/c-decl.c:10287
Please submit a full bug report, [etc.]
The regression appeared between 4.9.0 20131005 and 4.9.0 20131012.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
@ 2013-11-10 21:52 ` reichelt at gcc dot gnu.org
2013-11-11 14:48 ` burnus at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-10 21:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery,
| |ice-on-invalid-code, openmp
Known to fail| |4.9.0
--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Btw, the code was wrongly accepted before.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
2013-11-10 21:52 ` [Bug c/59073] " reichelt at gcc dot gnu.org
@ 2013-11-11 14:48 ` burnus at gcc dot gnu.org
2013-11-13 8:02 ` burnus at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-11-11 14:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Untested patch
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index f001a75..dea33c8 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -583 +583 @@ c_finish_omp_for (location_t locus, enum tree_code code,
- return NULL;
+ return error_mark_node;
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 09cce1c..93ddf92 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -11575 +11575 @@ c_parser_omp_for_loop (location_t loc, c_parser *parser,
- if (stmt)
+ if (stmt != error_mark_node)
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 366756f..b256831 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -6405,2 +6405,2 @@ finish_omp_for (location_t locus, enum tree_code code,
- if (omp_for == NULL)
- return NULL;
+ if (omp_for == error_mark_node)
+ return error_mark_node;
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
2013-11-10 21:52 ` [Bug c/59073] " reichelt at gcc dot gnu.org
2013-11-11 14:48 ` burnus at gcc dot gnu.org
@ 2013-11-13 8:02 ` burnus at gcc dot gnu.org
2013-11-19 9:48 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-11-13 8:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #2)
> Untested patch
Which doesn't work (or is insufficient).
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2013-11-13 8:02 ` burnus at gcc dot gnu.org
@ 2013-11-19 9:48 ` rguenth at gcc dot gnu.org
2013-11-19 15:08 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19 9:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2013-11-19 9:48 ` rguenth at gcc dot gnu.org
@ 2013-11-19 15:08 ` rguenth at gcc dot gnu.org
2014-04-09 5:37 ` asolokha at gmx dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19 15:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
` (4 preceding siblings ...)
2013-11-19 15:08 ` rguenth at gcc dot gnu.org
@ 2014-04-09 5:37 ` asolokha at gmx dot com
2014-04-22 11:37 ` [Bug c/59073] [4.9/4.10 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: asolokha at gmx dot com @ 2014-04-09 5:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Arseny Solokha <asolokha at gmx dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |asolokha at gmx dot com
--- Comment #4 from Arseny Solokha <asolokha at gmx dot com> ---
Cannot reproduce it w/ 4.9.0 20140406.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9/4.10 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
` (5 preceding siblings ...)
2014-04-09 5:37 ` asolokha at gmx dot com
@ 2014-04-22 11:37 ` jakub at gcc dot gnu.org
2014-04-22 16:23 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-22 11:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.0 |4.9.1
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.0 has been released
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9/4.10 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
` (6 preceding siblings ...)
2014-04-22 11:37 ` [Bug c/59073] [4.9/4.10 " jakub at gcc dot gnu.org
@ 2014-04-22 16:23 ` jakub at gcc dot gnu.org
2014-04-22 16:26 ` jakub at gcc dot gnu.org
2014-04-22 16:37 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-22 16:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Apr 22 16:22:22 2014
New Revision: 209646
URL: http://gcc.gnu.org/viewcvs?rev=209646&root=gcc&view=rev
Log:
PR c/59073
c/
* c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
fails, don't set OM_PARALLEL_COMBINED and return NULL.
cp/
* parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
fails, don't set OM_PARALLEL_COMBINED and return NULL.
testsuite/
* c-c++-common/gomp/pr59073.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/gomp/pr59073.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-parser.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9/4.10 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
` (7 preceding siblings ...)
2014-04-22 16:23 ` jakub at gcc dot gnu.org
@ 2014-04-22 16:26 ` jakub at gcc dot gnu.org
2014-04-22 16:37 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-22 16:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Apr 22 16:25:59 2014
New Revision: 209647
URL: http://gcc.gnu.org/viewcvs?rev=209647&root=gcc&view=rev
Log:
PR c/59073
c/
* c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
fails, don't set OM_PARALLEL_COMBINED and return NULL.
cp/
* parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
fails, don't set OM_PARALLEL_COMBINED and return NULL.
testsuite/
* c-c++-common/gomp/pr59073.c: New test.
Added:
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/gomp/pr59073.c
Modified:
branches/gcc-4_9-branch/gcc/c/ChangeLog
branches/gcc-4_9-branch/gcc/c/c-parser.c
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/parser.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c/59073] [4.9/4.10 Regression] ICE with missing increment in OpenMP for-loop
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
` (8 preceding siblings ...)
2014-04-22 16:26 ` jakub at gcc dot gnu.org
@ 2014-04-22 16:37 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-22 16:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-04-22 16:37 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-10 21:51 [Bug c/59073] New: [4.9 Regression] ICE with missing increment in OpenMP for-loop reichelt at gcc dot gnu.org
2013-11-10 21:52 ` [Bug c/59073] " reichelt at gcc dot gnu.org
2013-11-11 14:48 ` burnus at gcc dot gnu.org
2013-11-13 8:02 ` burnus at gcc dot gnu.org
2013-11-19 9:48 ` rguenth at gcc dot gnu.org
2013-11-19 15:08 ` rguenth at gcc dot gnu.org
2014-04-09 5:37 ` asolokha at gmx dot com
2014-04-22 11:37 ` [Bug c/59073] [4.9/4.10 " jakub at gcc dot gnu.org
2014-04-22 16:23 ` jakub at gcc dot gnu.org
2014-04-22 16:26 ` jakub at gcc dot gnu.org
2014-04-22 16:37 ` jakub 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).