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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr42645-1.C] - Blame information for rev 717

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

Line No. Rev Author Line
1 693 jeremybenn
// PR tree-optimization/42645
2
// { dg-do compile }
3
// { dg-options "-fcompare-debug -O1" }
4
 
5
extern void foo ();
6
 
7
struct S
8
{
9
  struct T
10
  {
11
    int t1;
12
    char t2[4];
13
    T *t3;
14
  } t;
15
  int m1 () const { return t.t3[0].t1; }
16
  char *m2 () { foo (); }
17
  void m3 (int x) { char *m = m2 (); if (m1 () > 0 && x > 0); }
18
  void m4 () { if (m1 () > 0) for (int i = 0; i < 4; i++) t.t2[i] = 0; }
19
};
20
 
21
void
22
f (S *a)
23
{
24
  a->m3 (0);
25
  a->m4 ();
26
}

powered by: WebSVN 2.1.0

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