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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [debug/] [vta-1.c] - Blame information for rev 701

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

Line No. Rev Author Line
1 689 jeremybenn
/* https://bugzilla.redhat.com/show_bug.cgi?id=521991#c5
2
 
3
   Distilled from Linux XFS source code.  foo, inlined into bar, ends
4
   up with debug stmts referencing the addressable variable b.
5
   Optimization made it non-addressable, and then completely optimized
6
   away, before we got a chance to rename (and discard) the occurrence
7
   in the debug stmt.  When we did, we crashed, attempting to rename
8
   an unreference variable.  */
9
 
10
/* { dg-do compile } */
11
 
12
static inline int
13
foo (void *x, unsigned y)
14
{
15
  unsigned z = *(unsigned long *) x % y;
16
  *(unsigned long *) x = *(unsigned long *) x / y;
17
  return z;
18
}
19
 
20
struct S
21
{
22
  unsigned t;
23
};
24
 
25
void
26
bar (struct S *x, int *y)
27
{
28
  int a = 0;
29
  unsigned long b = x->t;
30
  foo (&b, x->t);
31
  for (;; a++)
32
    if (b)
33
      *y = 1;
34
}

powered by: WebSVN 2.1.0

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