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/] [gcc.c-torture/] [execute/] [20020206-2.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
/* Origin: PR c/5420 from David Mosberger <davidm@hpl.hp.com>.
2
   This testcase was miscompiled when tail call optimizing, because a
3
   compound literal initialization was emitted only in the tail call insn
4
   chain, not in the normal call insn chain.  */
5
 
6
typedef struct { unsigned short a; } A;
7
 
8
extern void abort (void);
9
extern void exit (int);
10
 
11
void foo (unsigned int x)
12
{
13
  if (x != 0x800 && x != 0x810)
14
    abort ();
15
}
16
 
17
int
18
main (int argc, char **argv)
19
{
20
  int i;
21
  for (i = 0; i < 2; ++i)
22
    foo (((A) { ((!(i >> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a);
23
  exit (0);
24
}

powered by: WebSVN 2.1.0

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