aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/abi/aarch64_guard1.C
blob: e2669a89fbf956eef1e7215bd7dba28e0b22992c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Check that the initialization guard variable is an 8-byte aligned,
// 8-byte doubleword and that only the least significant bit is used
// for initialization guard variables.
// { dg-do compile { target aarch64*-*-* } }
// { dg-options "-O -fdump-tree-original -fno-section-anchors" }

int bar();

int *foo ()
{
  static int x = bar ();
  return &x;
}

// { dg-final { scan-assembler _ZGVZ3foovE1x,8,8 } }
// { dg-final { scan-tree-dump "& 1" "original" } }