OSDN Git Service

* gcc.dg/weak/typeof-2.c: Needs aliases as well as weak.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr17055-1.c
1 /* PR middle-end/17055.  */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -ffast-math" } */
4
5 /* This test used to abort, beacuse we do an "integer" fold to zero, i.e.
6    x - x = (T)0 where T is the type of x.  Unfortunately, fold_convert
7    was unable to convert integer_zero_node to the appropriate vector type.  */
8
9 typedef float v4sf __attribute__((vector_size(16)));
10 typedef int v4si __attribute__((vector_size(16)));
11
12 v4sf ivf, ovf;
13 v4si ivi, ovi;
14
15 void testf (void)
16 {
17   ovf = ivf - ivf;
18 }
19
20 void testi (void)
21 {
22   ovi = ivi - ivi;
23 }
24