From: Jakub Jelinek Date: Fri, 20 Dec 2013 13:07:10 +0000 (+0100) Subject: re PR tree-optimization/59413 (wrong code at -Os on x86_64-linux-gnu in both 32-bit... X-Git-Tag: releases/gcc-4.9.0~1959 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc4f394b22144fd86324bec3c0566ad6a548bc9b;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4d994b414727..7e90641adf71 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 000000000000..d7a2084ed63c --- /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; +}