User account creation filtered due to spam.

Bug 79212 - [6 Regression] internal compiler error: in maybe_lookup_decl_in_outer_ctx, at omp-low.c:4134
Summary: [6 Regression] internal compiler error: in maybe_lookup_decl_in_outer_ctx, at...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 7.0.1
: P2 normal
Target Milestone: 6.5
Assignee: davids
URL: https://gcc.gnu.org/ml/gcc-patches/20...
Keywords: ice-on-valid-code, openmp
Depends on:
Blocks:
 
Reported: 2017-01-24 15:17 UTC by davids
Modified: 2017-07-04 08:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 5.4.1
Known to fail: 6.3.1, 7.0
Last reconfirmed: 2017-01-25 00:00:00


Attachments
Simple openmp test case that exposes the ICE (156 bytes, text/plain)
2017-01-25 09:56 UTC, davids
Details

Note You need to log in before you can comment on or make changes to this bug.
Description davids 2017-01-24 15:17:23 UTC
When compiling the espresso-5.4.0 fortran package with FFLAGS-fopenmp I get the following assertion:

internal compiler error: in maybe_lookup_decl_in_outer_ctx, at omp-low.c:4134
0xa941e6 maybe_lookup_decl_in_outer_ctx
	/work/davshe01/oban-work-shoji/src/gcc/gcc/omp-low.c:4134
0xa9cadc scan_sharing_clauses
	/work/davshe01/oban-work-shoji/src/gcc/gcc/omp-low.c:1975
...
Comment 1 Richard Biener 2017-01-25 08:43:15 UTC
Testcase?
Comment 2 davids 2017-01-25 09:56:16 UTC
Created attachment 40575 [details]
Simple openmp test case that exposes the ICE

Compile the test with "gfortran -fopenmp"
Comment 3 ktkachov 2017-01-25 09:59:42 UTC
Confirmed on GCC 6 and trunk. GCC 5 doesn't ICE for me
Comment 4 Jakub Jelinek 2017-01-25 12:51:36 UTC
Started with r233913, I'll have a look.
Comment 5 davids 2017-01-25 12:53:14 UTC
(In reply to Jakub Jelinek from comment #4)
> Started with r233913, I'll have a look.

Hi Jakub, just to let you know I posted a possible fix for 7.0 release on the mailing list yesterday if you want to have a look.
Comment 6 davids 2017-01-26 10:42:07 UTC
Author: davids
Date: Thu Jan 26 10:41:35 2017
New Revision: 244922

URL: https://gcc.gnu.org/viewcvs?rev=244922&root=gcc&view=rev
Log:
2017-01-26  David Sherwood  <david.sherwood@arm.com>

    gcc/
	PR middle-end/79212
	* gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
	all contexts.

    gcc/testsuite/
	PR middle-end/79212
	* gfortran.dg/gomp/sharing-4.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/gomp/sharing-4.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimplify.c
    trunk/gcc/testsuite/ChangeLog
Comment 7 Jakub Jelinek 2017-01-26 13:33:27 UTC
Fixed on the trunk so far.
Comment 8 Richard Biener 2017-07-04 08:49:11 UTC
GCC 6.4 is being released, adjusting target milestone.