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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [nrv4.C] - Blame information for rev 301

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// PR optimization/7145
2
// Bug: The NRV optimization caused us to lose the initializer for 'ret'.
3
// { dg-options -O }
4
// { dg-do run }
5
 
6
struct GdkColor {
7
  long  pixel;
8
  short red;
9
  short green;
10
  short blue;
11
};
12
 
13
inline GdkColor mkcolor() {
14
  GdkColor ret={0,1,2,3};
15
  return ret;
16
}
17
 
18
int
19
main()
20
{
21
  GdkColor col=mkcolor();
22
  return (col.pixel != 0 || col.red != 1 || col.green != 2 || col.blue != 3);
23
}

powered by: WebSVN 2.1.0

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