This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36300] Incorrect type used for inlined expression
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 May 2008 09:27:41 -0000
- Subject: [Bug middle-end/36300] Incorrect type used for inlined expression
- References: <bug-36300-16214@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-05-26 09:27 -------
Reduced testcase, fails with 32bit and 64bit, works with 2.95.4.
extern void abort (void);
#define VALUE ((int)((long long)U1 * (long long)3) + 2)
int main(void)
{
int U1;
long long Y, Y2;
int t;
U1 = -2147483647-1;
Y = ((long long)(VALUE * VALUE) * 3);
t = VALUE;
Y2 = ((long long)(t * t) * 3);
if (Y != Y2)
abort ();
return 0;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.1.3 4.2.4 4.3.0 |3.3.6 4.1.3 4.2.4 4.3.0
Known to work| |2.95.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36300