diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-04-21 10:51:53 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-04-21 10:51:53 +0200 |
commit | 666f7903e0334ef65669277383e4028a4fe9ef0c (patch) | |
tree | 59d832c85f833e7c17fcdcebd0b28c10ce1a5fe0 /gcc/c | |
parent | 25c28f47f8c909b768cc8aac372f5616fd871e15 (diff) | |
download | gcc-666f7903e0334ef65669277383e4028a4fe9ef0c.zip gcc-666f7903e0334ef65669277383e4028a4fe9ef0c.tar.gz gcc-666f7903e0334ef65669277383e4028a4fe9ef0c.tar.bz2 |
re PR c/80468 (ICE on invalid AVX512 code with -m32)
PR c/80468
* c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
enabled, set specs->type to integer_type_node.
* gcc.dg/pr80468.c: New test.
From-SVN: r247052
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-decl.c | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index ec19221..143aff9 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2017-04-21 Jakub Jelinek <jakub@redhat.com> + + PR c/80468 + * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not + enabled, set specs->type to integer_type_node. + 2017-04-03 Jonathan Wakely <jwakely@redhat.com> * c-array-notation.c: Fix typo in comment. diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 53c390c..64a11079 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -10929,9 +10929,12 @@ finish_declspecs (struct c_declspecs *specs) case cts_int_n: gcc_assert (!specs->long_p && !specs->short_p && !specs->long_long_p); gcc_assert (!(specs->signed_p && specs->unsigned_p)); - specs->type = (specs->unsigned_p - ? int_n_trees[specs->int_n_idx].unsigned_type - : int_n_trees[specs->int_n_idx].signed_type); + if (! int_n_enabled_p[specs->int_n_idx]) + specs->type = integer_type_node; + else + specs->type = (specs->unsigned_p + ? int_n_trees[specs->int_n_idx].unsigned_type + : int_n_trees[specs->int_n_idx].signed_type); if (specs->complex_p) { pedwarn (specs->locations[cdw_complex], OPT_Wpedantic, |