tree-optimization/111233 - loop splitting miscompile
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr70457.c
blob74daed4d36f6ff448ddf7bd40d78afaee64d1653
1 /* { dg-do compile } */
3 /* This formerly ICEd when trying to expand pow as a built-in with
4 the wrong number of arguments. */
6 extern double pow (double, double) __attribute__ ((__nothrow__ , __leaf__));
8 typedef struct {
9 long long data;
10 int tag;
11 } Object;
13 extern Object Make_Flonum (double);
14 extern Object P_Pow (Object, Object);
16 Object General_Function (Object x, Object y, double (*fun)()) {
17 double d, ret;
19 d = 1.0;
21 if (y.tag >> 1)
22 ret = (*fun) (d);
23 else
24 ret = (*fun) (d, 0.0);
26 return Make_Flonum (ret);
29 Object P_Pow (Object x, Object y) { return General_Function (x, y, pow); }