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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr29801.c] - Blame information for rev 699

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

Line No. Rev Author Line
1 689 jeremybenn
/* We used to crash in ccp here, because the initial constant value of 2
2
   was changed to 5.  */
3
 
4
/* { dg-do compile } */
5
/* { dg-options "-O2 -fdump-tree-optimized" } */
6
 
7
static const int a = 2;
8
 
9
int test (int param)
10
{
11
  int *p = (int *) &a;
12
 
13
  if (param)
14
    *p = 5;
15
 
16
  return a;
17
}
18
 
19
/* Check that we return the correct (unchanged) value.  */
20
 
21
/* { dg-final { scan-tree-dump-times "return 2" 1 "optimized" } } */
22
/* { dg-final { scan-tree-dump-times "return 5" 0 "optimized" } } */
23
 
24
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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