OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [ipa-pta-1.c] - Rev 754

Go to most recent revision | Compare with Previous | Blame | View Log

/* { dg-do compile { target { nonpic } } } */
/* { dg-options "-fipa-pta -fdump-ipa-pta" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */
 
struct X { char x; char y; };
 
char *q;
 
static void __attribute__((noinline))
bar (char *p)
{
  q = p;
}
 
void test1 (char a1, char b, char c, char d, char e, char f, char g, char h)
{
  char *p = &a1;
  p++;
  bar (p);
}
 
void test2 (struct X a2, char b, char c, char d, char e, char f, char g, char h)
{
  char *p = &a2.x;
  p++;
  bar (p);
}
 
void test3 (struct X a3, char b, char c, char d, char e, char f, char g, char h)
{
  char *p = &a3.y;
  bar (p);
}
 
void test4 (int a4, char b, char c, char d, char e, char f, char g, char h)
{
  char *p = (char *)&a4;
  p++;
  p++;
  p++;
  p++;
  bar (p);
}
 
/* { dg-final { scan-ipa-dump "bar.arg0 = { test4.arg0 test3.arg0 test2.arg0 test1.arg0 }" "pta" } } */
/* { dg-final { cleanup-ipa-dump "pta" } } */
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.