OSDN Git Service

2012-01-03 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / scal-to-vec2.c
1 /* { dg-do compile } */   
2 /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
3 /* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
4
5 /* Test for C_MAYBE_CONST are folded correctly when 
6    expanding an expression to vector.  */
7
8 int                     f(void);
9 unsigned int            g(void);
10 unsigned int            h;
11
12 typedef unsigned int vec __attribute__((vector_size(16)));
13
14 vec i;
15
16
17 vec fv1(void) { return i + (h ? f() : g()); }
18 vec fv2(void) { return (h ? f() : g()) + i; }