view gcc/testsuite/c-c++-common/scal-to-vec2.c @ 125:2c7bdd5a49f6

supress return with no value, in function returning non-void warning on goto code segment in normal function
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 01 Apr 2018 14:05:45 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */   
/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
/* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
/* Ignore warning on some powerpc-ibm-aix configurations. */
/* { dg-prune-output "non-standard ABI extension" } */

/* 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; }