summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/scal-to-vec2.c
blob: 9ff8c059e567b32c3714905bacf5d21dba2e075d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */   
/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */

/* Test for C_MAYBE_CONST are folded correctly when 
   expanding an expression to vector.  */

int 			f(void);
unsigned int 		g(void);
unsigned int 		h;

typedef unsigned int vec __attribute__((vector_size(16)));

vec i;


vec fv1(void) { return i + (h ? f() : g()); }
vec fv2(void) { return (h ? f() : g()) + i; }