This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/83269] [8 Regression] Wrong constant folding
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Dec 2017 16:06:28 +0000
- Subject: [Bug tree-optimization/83269] [8 Regression] Wrong constant folding
- Auto-submitted: auto-generated
- References: <bug-83269-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83269
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
With -O2 this started to FAIL in between r124153 and r124228 and FAILs up to
current trunk.
With -O1, it reappeared with r247495.
Slightly adjusted:
int
main ()
{
#if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ > 4 && __CHAR_BIT__ == 8
volatile unsigned char a = 1;
long long b = 0x80000000L;
int c = -((int)(-b) - (-0x7fffffff * a));
if (c != 1)
__builtin_abort ();
#endif
return 0;
}