From fc4f394b22144fd86324bec3c0566ad6a548bc9b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 20 Dec 2013 14:07:10 +0100 Subject: [PATCH] re PR tree-optimization/59413 (wrong code at -Os on x86_64-linux-gnu in both 32-bit and 64-bit modes) PR tree-optimization/59413 * gcc.c-torture/execute/pr59413.c: New test. From-SVN: r206147 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.c-torture/execute/pr59413.c | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr59413.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4d994b41472..7e90641adf7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2013-12-20 Jakub Jelinek + PR tree-optimization/59413 + * gcc.c-torture/execute/pr59413.c: New test. + * c-c++-common/ubsan/load-bool-enum.c: New test. 2013-12-04 Kyrylo Tkachov diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59413.c b/gcc/testsuite/gcc.c-torture/execute/pr59413.c new file mode 100644 index 00000000000..d7a2084ed63 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr59413.c @@ -0,0 +1,21 @@ +/* PR tree-optimization/59413 */ + +typedef unsigned int uint32_t; + +uint32_t a; +int b; + +int +main () +{ + uint32_t c; + for (a = 7; a <= 1; a++) + { + char d = a; + c = d; + b = a == c; + } + if (a != 7) + __builtin_abort (); + return 0; +}