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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [nrv4.C] - Rev 774

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

// PR optimization/7145
// Bug: The NRV optimization caused us to lose the initializer for 'ret'.
// { dg-options -O }
// { dg-do run }

struct GdkColor {
  long  pixel;
  short red;
  short green;
  short blue;
};

inline GdkColor mkcolor() {
  GdkColor ret={0,1,2,3};
  return ret;
}

int
main()
{
  GdkColor col=mkcolor();
  return (col.pixel != 0 || col.red != 1 || col.green != 2 || col.blue != 3);
}

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

powered by: WebSVN 2.1.0

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