diff options
author | Richard Biener <rguenther@suse.de> | 2017-09-25 11:40:23 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-09-25 11:40:23 +0000 |
commit | d362ac6c6d5a9419d9b7a0db84155a065e113434 (patch) | |
tree | 8340c3bcb0ae35deec3fc34e274fac0655a9d27f /gcc/testsuite | |
parent | fb202364391854f7c16eee74c270b0d78ad8f532 (diff) | |
download | gcc-d362ac6c6d5a9419d9b7a0db84155a065e113434.zip gcc-d362ac6c6d5a9419d9b7a0db84155a065e113434.tar.gz gcc-d362ac6c6d5a9419d9b7a0db84155a065e113434.tar.bz2 |
re PR tree-optimization/82285 (Optimizing error when using enumeration)
2017-09-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/82285
* tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
enumeral types.
* gcc.dg/torture/pr82285.c: New testcase.
From-SVN: r253146
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr82285.c | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6a25a14..333e2c8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-25 Richard Biener <rguenther@suse.de> + + PR tree-optimization/82285 + * gcc.dg/torture/pr82285.c: New testcase. + 2017-09-25 Justin Squirek <squirek@adacore.com> * gnat.dg/entry_family.adb: New testcase diff --git a/gcc/testsuite/gcc.dg/torture/pr82285.c b/gcc/testsuite/gcc.dg/torture/pr82285.c new file mode 100644 index 0000000..6edc750 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr82285.c @@ -0,0 +1,16 @@ +/* { dg-do run } */ + +enum tst { first = 0, second = 1 }; + +int +main () +{ + enum tst data[16]; + + for (unsigned i = 0; i < 16; i++) + data[i] = (i < 5 ? second : first); + + if (data[2] != second) + __builtin_abort (); + return 0; +} |