LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / pr63595.c
blobee489347c85f2b409d9f289f4659aec4735926b8
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-icf-details" } */
3 /* { dg-require-effective-target ptr32plus } */
5 typedef int size_t;
7 typedef struct TypHeader {
8 unsigned long size;
9 struct TypHeader * * ptr;
10 char name[3];
11 unsigned char type;
12 } * TypHandle;
14 __attribute__((noinline))
15 static TypHandle Error(const char *str, unsigned long l1, unsigned long l2)
17 return 0;
20 extern TypHandle (* EvTab[81]) ( TypHandle hd );
21 extern TypHandle (*TabProd[28][28]) ( TypHandle, TypHandle );
23 __attribute__((noinline))
24 TypHandle FunOnRight (TypHandle hdCall)
26 TypHandle hdRes;
27 TypHandle hdPnt;
28 TypHandle hdElm;
31 if ( ((hdCall)->size) != 3*((size_t)sizeof(TypHandle)) )
32 return Error("",0L,0L);
33 hdPnt = ((long)(((TypHandle*)((hdCall)->ptr))[1])&1 ? (((TypHandle*)((hdCall)->ptr))[1]) : (* EvTab[(((long)(((TypHandle*)((hdCall)->ptr))[1]) & 1) ? 1 : ((((TypHandle*)((hdCall)->ptr))[1])->type))])((((TypHandle*)((hdCall)->ptr))[1])));
34 hdElm = ((long)(((TypHandle*)((hdCall)->ptr))[2])&1 ? (((TypHandle*)((hdCall)->ptr))[2]) : (* EvTab[(((long)(((TypHandle*)((hdCall)->ptr))[2]) & 1) ? 1 : ((((TypHandle*)((hdCall)->ptr))[2])->type))])((((TypHandle*)((hdCall)->ptr))[2])));
37 hdRes = ((*TabProd[(((long)(hdPnt) & 1) ? 1 : ((hdPnt)->type))][(((long)(hdElm) & 1) ? 1 : ((hdElm)->type))])((hdPnt),(hdElm)));
38 return hdRes;
41 __attribute__((noinline))
42 TypHandle FunOnLeft (TypHandle hdCall)
44 TypHandle hdRes;
45 TypHandle hdPnt;
46 TypHandle hdElm;
49 if ( ((hdCall)->size) != 3*((size_t)sizeof(TypHandle)) )
50 return Error("",0L,0L);
51 hdPnt = ((long)(((TypHandle*)((hdCall)->ptr))[1])&1 ? (((TypHandle*)((hdCall)->ptr))[1]) : (* EvTab[(((long)(((TypHandle*)((hdCall)->ptr))[1]) & 1) ? 1 : ((((TypHandle*)((hdCall)->ptr))[1])->type))])((((TypHandle*)((hdCall)->ptr))[1])));
52 hdElm = ((long)(((TypHandle*)((hdCall)->ptr))[2])&1 ? (((TypHandle*)((hdCall)->ptr))[2]) : (* EvTab[(((long)(((TypHandle*)((hdCall)->ptr))[2]) & 1) ? 1 : ((((TypHandle*)((hdCall)->ptr))[2])->type))])((((TypHandle*)((hdCall)->ptr))[2])));
55 hdRes = ((*TabProd[(((long)(hdElm) & 1) ? 1 : ((hdElm)->type))][(((long)(hdPnt) & 1) ? 1 : ((hdPnt)->type))])((hdElm),(hdPnt)));
56 return hdRes;
59 int main()
61 return 0;
64 /* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */
65 /* { dg-final { scan-ipa-dump "PHI results are different" "icf" } } */