aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr96453.c
blob: f758e7ec77a45d109b0257c53e380b7e225d6fb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-Og -fno-early-inlining -fno-tree-ccp -fno-tree-dce" } */
/* { dg-additional-options "-mavx -mno-sse4.2" { target x86_64-*-* i?86-*-* } } */

typedef int __attribute__ ((__vector_size__ (16))) U;
typedef unsigned long __attribute__ ((__vector_size__ (16))) V;

static inline int
bar (unsigned long e, V f)
{
  V g = f != e;
  (union {U b;}){(U) g};
}

void
foo (void)
{
  int j = bar (8, (V) { });
  for (unsigned i;; i[&j])
    ;
}