This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgomp/66429] New: ICE in expand_GOMP_SIMD_LAST_LANE


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66429

            Bug ID: 66429
           Summary: ICE in expand_GOMP_SIMD_LAST_LANE
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Consider testcase libgomp/testsuite/libgomp.c/for-2.c. It starts with:
...
/* { dg-options "-std=gnu99 -fopenmp" } */
...


I.

When running the testcase, we see in the compilation line:
...
 -fopenmp -std=gnu99 -fopenmp
...

The -fopenmp in dg-options is superfluous, because -fopenmp is forced in c.exp:
...
# Turn on OpenMP.                                                     
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
...

Removing the -fopenmp from dg-options gives us:
...
-fopenmp  -std=gnu99
...


II.

The std=gnu99 is to support loop initial declarations, such as this one from
for-2.h:
...
  for (unsigned int i = __INT_MAX__; i < 3000U + __INT_MAX__; i += 2)
...

But the default C mode has changed from gnu89 to gnu11, so that setting is no
longer needed. Using empty dg-options, the test still passes:
...
PASS: libgomp.c/for-2.c (test for excess errors)
PASS: libgomp.c/for-2.c execution test
...


III.

Removing the empty dg-options, brings the change that it's compiled with
default option -O2, and we get an internal compiler error:
...
FAIL: libgomp.c/for-2.c (internal compiler error)
FAIL: libgomp.c/for-2.c (test for excess errors)
UNRESOLVED: libgomp.c/for-2.c compilation failed to produce executable
...

In more detail
...
In file included from src/libgomp/testsuite/libgomp.c/for-1.h:8:0,^M
                 from src/libgomp/testsuite/libgomp.c/for-2.c:18:^M
src/libgomp/testsuite/libgomp.c/for-2.h: In function
'f12_pf_simd_static32._omp_fn.27':^M
src/libgomp/testsuite/libgomp.c/for-2.h:153:9: internal compiler error: in
expand_GOMP_SIMD_LAST_LANE, at internal-fn.c:190^M
0xbb4308 expand_GOMP_SIMD_LAST_LANE^M
        src/gcc/internal-fn.c:190^M
0xbbaeec expand_internal_call(gcall*)^M
        src/gcc/internal-fn.c:1996^M
0x864305 expand_call_stmt^M
        src/gcc/cfgexpand.c:2322^M
0x868656 expand_gimple_stmt_1^M
        src/gcc/cfgexpand.c:3266^M
0x868d98 expand_gimple_stmt^M
        src/gcc/cfgexpand.c:3420^M
0x872002 expand_gimple_basic_block^M
        src/gcc/cfgexpand.c:5432^M
0x873d1b execute^M
        src/gcc/cfgexpand.c:6051^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
Please include the complete backtrace with any bug report.^M
See <http://gcc.gnu.org/bugs.html> for instructions.^M
...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]