Bug 67335 - [6 Regression] ICE in compiling omp simd function with unused argument
Summary: [6 Regression] ICE in compiling omp simd function with unused argument
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 6.0
: P2 normal
Target Milestone: 6.3
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code, openmp
Depends on:
Blocks:
 
Reported: 2015-08-24 07:50 UTC by vincenzo Innocente
Modified: 2017-05-30 07:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-10-18 00:00:00


Attachments
gcc7-pr67335.patch (604 bytes, patch)
2016-11-21 10:57 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vincenzo Innocente 2015-08-24 07:50:05 UTC
cat ompsimd_t.cc
#pragma omp declare simd notinbranch uniform(q)
float bar(float x, float * q, int){
  return q[0]+q[1]*x;
}

c++ -fopenmp -Wall -S  ompsimd_t.cc
ompsimd_t.cc: In function ‘__vector(4) float _Z3barfPfi.simdclone.0(float, float*, int)’:
ompsimd_t.cc:4:1: internal compiler error: Segmentation fault: 11
 }
 ^

ompsimd_t.cc:4:1: internal compiler error: Abort trap: 6
c++: internal compiler error: Abort trap: 6 (program cc1plus)

gcc version 6.0.0 20150801 (experimental) [trunk revision 226463] (GCC)
Comment 1 Martin Liška 2016-10-18 15:17:13 UTC
Confirmed, started with 4.9.0.
Comment 2 Jakub Jelinek 2016-11-21 10:57:46 UTC
Created attachment 40097 [details]
gcc7-pr67335.patch

Untested fix.
Comment 3 Jakub Jelinek 2016-11-21 19:18:07 UTC
Author: jakub
Date: Mon Nov 21 19:17:36 2016
New Revision: 242678

URL: https://gcc.gnu.org/viewcvs?rev=242678&root=gcc&view=rev
Log:
	PR middle-end/67335
	* omp-simd-clone.c (simd_clone_adjust_argument_types): Use NULL prefix
	for tmp simd array if DECL_NAME (parm) is NULL.

	* g++.dg/vect/simd-clone-7.cc: New test.

Added:
    trunk/gcc/testsuite/g++.dg/vect/simd-clone-7.cc
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/omp-simd-clone.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Jakub Jelinek 2016-11-28 22:55:01 UTC
Fixed on the trunk so far.
Comment 5 Jakub Jelinek 2016-12-07 22:54:00 UTC
Author: jakub
Date: Wed Dec  7 22:53:28 2016
New Revision: 243405

URL: https://gcc.gnu.org/viewcvs?rev=243405&root=gcc&view=rev
Log:
	Backported from mainline
	2016-11-21  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/67335
	* omp-simd-clone.c (simd_clone_adjust_argument_types): Use NULL prefix
	for tmp simd array if DECL_NAME (parm) is NULL.

	* g++.dg/vect/simd-clone-7.cc: New test.

Added:
    branches/gcc-6-branch/gcc/testsuite/g++.dg/vect/simd-clone-7.cc
Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/omp-simd-clone.c
    branches/gcc-6-branch/gcc/testsuite/ChangeLog
Comment 6 Jakub Jelinek 2016-12-08 09:40:40 UTC
Fixed.
Comment 7 Jakub Jelinek 2017-05-30 07:43:20 UTC
Author: jakub
Date: Tue May 30 07:42:48 2017
New Revision: 248625

URL: https://gcc.gnu.org/viewcvs?rev=248625&root=gcc&view=rev
Log:
	Backported from mainline
	2016-11-21  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/67335
	* omp-low.c (simd_clone_adjust_argument_types): Use NULL prefix
	for tmp simd array if DECL_NAME (parm) is NULL.

	* g++.dg/vect/simd-clone-7.cc: New test.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/vect/simd-clone-7.cc
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/omp-low.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog