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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [anonunion1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/5748
2
// This testcase ICEd because used flag from the anon union variables
3
// was not propagated back to the anon union itself, causing addressof
4
// not to be replaced with stack slot.
5
// { dg-do compile }
6
// { dg-options "-O2" }
7
 
8
struct A {
9
  A ();
10
  ~A ();
11
  int foo ();
12
  int bar (void *x, int y);
13
};
14
 
15
int A::foo()
16
{
17
  union {
18
    int a;
19
    int b;
20
  };
21
 
22
  if (bar (&a, sizeof (int)) != 32)
23
    return 16;
24
  return 0;
25
}

powered by: WebSVN 2.1.0

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