re PR tree-optimization/36187 (Partitioning problem with SFTs (again))

2008-05-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36187
	* g++.dg/opt/pr36187.C: New testcase.

From-SVN: r135126
This commit is contained in:
Richard Biener 2008-05-09 20:04:57 +00:00
parent 53a8f70990
commit cc7f489c20
2 changed files with 51 additions and 1 deletions

View File

@ -1,4 +1,9 @@
2008-01-08 Jan Sjodin <jan.sjodin@amd.com>
2008-05-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36187
* g++.dg/opt/pr36187.C: New testcase.
2008-05-08 Jan Sjodin <jan.sjodin@amd.com>
Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/tree-ssa/data-dep-1.c: New.

View File

@ -0,0 +1,45 @@
/* { dg-do run } */
/* { dg-options "-O2 --param max-aliased-vops=20" } */
extern "C" void abort (void);
enum SbxDataType { SbxINTEGER, SbxDECIMAL, SbxBYREF = 0x4000 };
struct SbxValues {
union {
float nSingle;
float* pSingle;
};
SbxDataType eType;
};
static bool ImpPutDoubleFoo( SbxValues* p)
{
bool bRet = false;
SbxValues aTmp;
int count = 0;
start:
switch( p->eType ) {
case SbxINTEGER:
if (count++ > 0)
abort ();
aTmp.pSingle = &p->nSingle; goto direct;
case SbxBYREF | SbxDECIMAL:
bRet = false;
break;
direct:
aTmp.eType = SbxDataType( p->eType | SbxBYREF );
p = &aTmp; goto start;
case SbxBYREF | SbxINTEGER:
break;
default:
bRet =true;
}
return bRet;
}
int main( int argc, char** argv )
{
SbxValues aTmp;
aTmp.eType = SbxINTEGER;
if ( ImpPutDoubleFoo( &aTmp ) )
abort ();
return 0;
}