Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / tree-ssa / pr20963.C
blobd8f91e1be3153f759064c0bf28b5efea4d82f93f
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 /* This was causing PRE to insert the value of the ADDR variable, to 
5    remove the invariant cast but in doing so, it was creating a 
6    non-invariant expression out of the invariant one, causing a later 
7    failure in PRE.  */ 
8 struct sMCB { 
9   unsigned char type; 
10 }; 
12 extern void foo (void); 
13 unsigned char mem_readb(char *pt) __attribute__((nothrow)); 
15 void DOS_FreeProcessMemory(unsigned short pspseg) { 
16         while (1) { 
17                 if (pspseg) 
18                         foo (); 
19                 char *addr = (char*)(&((sMCB*)0)->type); 
20                 if (mem_readb(addr)==0x5a) break; 
21         } 
22 };