Bug 87887 - ICE in make_ssa_name_fn, at tree-ssanames.c:269
Summary: ICE in make_ssa_name_fn, at tree-ssanames.c:269
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, openmp
Depends on:
Blocks:
 
Reported: 2018-11-05 18:54 UTC by G. Steinmetz
Modified: 2019-08-30 11:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description G. Steinmetz 2018-11-05 18:54:18 UTC
Affects versions down to at least gcc-5 :


$ cat z1.c
struct foo
{
  int n : 16;
};
#pragma omp declare simd
struct foo
f (int x)
{
}


$ gcc-9-20181104 -c z1.c -fopenmp -m64
$ gcc-9-20181104 -c z1.c -fopenmp -m32
during IPA pass: simdclone
z1.c: In function 'f.simdclone.1':
z1.c:9:1: internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:269
    9 | }
      | ^
0xc2cfa5 make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int)
        ../../gcc/tree-ssanames.c:266
0x11fc606 make_ssa_name
        ../../gcc/tree-ssanames.h:115
0x11fc606 simd_clone_adjust
        ../../gcc/omp-simd-clone.c:1230
0x11fde77 expand_simd_clones(cgraph_node*)
        ../../gcc/omp-simd-clone.c:1676
0x11fe337 ipa_omp_simd_clone
        ../../gcc/omp-simd-clone.c:1694
0x11fe337 execute
        ../../gcc/omp-simd-clone.c:1722



For both -m32|-m64 while configured with --enable-checking=yes :

$ gcc-9-20181104-chk -c z1.c -fopenmp -m64
during IPA pass: simdclone
z1.c: In function 'f.simdclone.0':
z1.c:9:1: internal compiler error: tree check: expected none of record_type or union_type or qual_union_type or array_type, have record_type in layout_type, at stor-layout.c:2363
    9 | }
      | ^
0x5ca52e tree_not_check_failed(tree_node const*, char const*, int, char const*, ...)
        ../../gcc/tree.c:9527
0xbeedd7 tree_not_check4(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code, tree_code)
        ../../gcc/tree.h:3195
0xbeedd7 layout_type(tree_node*)
        ../../gcc/stor-layout.c:2363
0xee3ece make_vector_type
        ../../gcc/tree.c:9744
0x150cf5e simd_clone_adjust_return_type
        ../../gcc/omp-simd-clone.c:509
0x150fa63 simd_clone_adjust
        ../../gcc/omp-simd-clone.c:1103
0x15144a6 expand_simd_clones(cgraph_node*)
        ../../gcc/omp-simd-clone.c:1676
0x1514fe7 ipa_omp_simd_clone
        ../../gcc/omp-simd-clone.c:1694
0x1514fe7 execute
        ../../gcc/omp-simd-clone.c:1722
Comment 1 Jakub Jelinek 2019-02-02 00:05:10 UTC
Author: jakub
Date: Sat Feb  2 00:04:39 2019
New Revision: 268466

URL: https://gcc.gnu.org/viewcvs?rev=268466&root=gcc&view=rev
Log:
	PR middle-end/87887
	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
	Punt with warning on aggregate return or argument types.  Ignore
	type/mode checking for uniform arguments.

	* gcc.dg/gomp/pr87887-1.c: New test.
	* gcc.dg/gomp/pr87887-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/gomp/pr87887-1.c
    trunk/gcc/testsuite/gcc.dg/gomp/pr87887-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog
Comment 2 Jakub Jelinek 2019-02-04 17:14:39 UTC
Fixed for GCC9.
Comment 3 Jakub Jelinek 2019-02-07 14:54:05 UTC
Author: jakub
Date: Thu Feb  7 14:53:33 2019
New Revision: 268643

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

	PR middle-end/87887
	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
	Punt with warning on aggregate return or argument types.  Ignore
	type/mode checking for uniform arguments.

	* gcc.dg/gomp/pr87887-1.c: New test.
	* gcc.dg/gomp/pr87887-2.c: New test.

Added:
    branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr87887-1.c
    branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr87887-2.c
Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/config/i386/i386.c
    branches/gcc-8-branch/gcc/testsuite/ChangeLog
Comment 4 Jakub Jelinek 2019-08-30 11:37:29 UTC
Author: jakub
Date: Fri Aug 30 11:36:58 2019
New Revision: 275097

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

	PR middle-end/87887
	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
	Punt with warning on aggregate return or argument types.  Ignore
	type/mode checking for uniform arguments.

	* gcc.dg/gomp/pr87887-1.c: New test.
	* gcc.dg/gomp/pr87887-2.c: New test.

Added:
    branches/gcc-7-branch/gcc/testsuite/gcc.dg/gomp/pr87887-1.c
    branches/gcc-7-branch/gcc/testsuite/gcc.dg/gomp/pr87887-2.c
Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/config/i386/i386.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog