OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [parse10.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// Testcase for precedence of ?: wrt =
3
 
4
extern "C" int printf (const char *, ...);
5
 
6
int main()
7
{
8
  int j = 0, k = 0;
9
  1 ? j : k = 5;                // should be parsed 1 ? j : (k = 5)
10
  (void) (1 ? k = 5 : 0);
11
  k = 5 ? 1 : 0;                // should be parsed k = (5 ? 1 : 0)
12
 
13
  printf ("%d %d\n", j, k);
14
 
15
  return j == 5 || k == 5;
16
}

powered by: WebSVN 2.1.0

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