This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/36300] Incorrect type used for inlined expression



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]