re PR middle-end/26630 (Incorrect result when subtracting, casting to short and back to int, adding and multiplying)

2006-03-13  Richard Guenther  <rguenther@suse.de>

        PR middle-end/26630
        * gcc.dg/torture/pr26630.c: New testcase.

From-SVN: r111990
This commit is contained in:
Richard Biener 2006-03-13 09:02:40 +00:00
parent 76659655d6
commit 0394ea7311
2 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,9 @@
2003-03-11 Roger Sayle <roger@eyesopen.com>
2006-03-13 Richard Guenther <rguenther@suse.de>
PR middle-end/26630
* gcc.dg/torture/pr26630.c: New testcase.
2006-03-11 Roger Sayle <roger@eyesopen.com>
* gfortran.dg/dependency_10.f90: New test case.
* gfortran.dg/dependency_11.f90: Likewise.

View File

@ -0,0 +1,11 @@
/* { dg-do run } */
extern void abort(void);
int main()
{
int a1 = 40000;
int c1 = ( ((int)(short)(a1-10000)) + 10000)*2;
if (c1 != 80000)
abort();
return 0;
}