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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [lto/] [ipareference_0.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-lto-options {{ -O1 -flto -flto-partition=1to1 }} } */
2
/* { dg-lto-do run } */
3
 
4
/* Test that ipa-reference notice that get_val will not change since do_nothing does not
5
   modify anything.  This needs streaming cross file boundary summaries.  */
6
extern int get_val (void);
7
extern int set_val (void);
8
extern do_nothing (void);
9
void abort (void);
10
main()
11
{
12
  int a;
13
  int b;
14
  set_val ();
15
  a = get_val ();
16
  do_nothing();
17
  b = get_val ();
18
  if (a==b)
19
    {
20
      if (!__builtin_constant_p (a==b))
21
        abort ();
22
      return 0;
23
    }
24
  else
25
    abort ();
26
}

powered by: WebSVN 2.1.0

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