Commit 199db659 by Roger Sayle Committed by Roger Sayle

re PR middle-end/19068 ([3.3 only] Wrong code for MIN_EXPR and MAX_EXPR)


	PR middle-end/19068
	* g++.dg/opt/max1.C: New test case.

From-SVN: r92388
parent 38606553
2004-12-19 Roger Sayle <roger@eyesopen.com>
PR middle-end/19068
* g++.dg/opt/max1.C: New test case.
2004-12-18 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/fdata-sections-1.c: New test.
......
/* PR middle-end/19068 */
/* Test case by Andrew Pinski <pinskia@physics.uc.edu> */
/* { dg-do run } */
/* { dg-options "-O2" } */
extern "C" void abort (void);
long fff[10];
void f(long a)
{
int i;
a = *((long*)(a+5)) >? *((long*)(a+1));
for(i=0;i<10;i++)
fff[i] = a;
}
int main(void)
{
int i;
long a[2] = {10,5};
f((long)(&a)-1);
for(i = 0;i<10;i++)
if (fff[i]!=10)
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment