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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [sra-1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=223576 */
2
 
3
/* SRA failed to canonicalize bit-field types, introducing type
4
   mismatches.  */
5
 
6
/* { dg-do compile } */
7
/* { dg-options "-O2" } */
8
 
9
struct A
10
{
11
  int a:16;
12
  /* These dummy bit-fields are here to prevent GCC 4.2+ from merging
13
     the bit-field compares into a single word compare, which disables
14
     SRA.  */
15
  int a2:16;
16
  int a3:16;
17
  int a4:16;
18
  int b:8;
19
  bool operator==(A const x) const
20
  {
21
    return (this->a == x.a && this->b == x.b);
22
  }
23
};
24
 
25
bool
26
foo (A const x, A const y)
27
{
28
  return x == y;
29
}

powered by: WebSVN 2.1.0

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