OSDN Git Service

2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / c-c++-common / 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 /* Ignore warning on some powerpc-ibm-aix configurations. */
5 /* { dg-prune-output "non-standard ABI extension" } */
6
7 /* Test for C_MAYBE_CONST are folded correctly when 
8    expanding an expression to vector.  */
9
10 int                     f(void);
11 unsigned int            g(void);
12 unsigned int            h;
13
14 typedef unsigned int vec __attribute__((vector_size(16)));
15
16 vec i;
17
18
19 vec fv1(void) { return i + (h ? f() : g()); }
20 vec fv2(void) { return (h ? f() : g()) + i; }