Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-options "-O3" } */ typedef unsigned int myint __attribute__((aligned(1))); typedef struct S { unsigned a, b, c; } SS; typedef struct U { SS s[2]; } UU; typedef UU __attribute__((aligned(1))) UUU; static unsigned int __attribute__ ((noinline)) get_a (SS s) { return s.a; }; static int __attribute__ ((noinline, noclone)) foo (UUU *p) { int r = (int) get_a(p->s[0]) + 2; return r; } char buf[512]; static UUU * __attribute__ ((noinline, noclone)) get_uuu (void) { return (UUU *)(buf + 1); } int main(int argc, char *argv[]) { UUU *p = get_uuu(); if (foo(p) != 2) __builtin_abort (); return 0; }