URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [parse10.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do run }
// Testcase for precedence of ?: wrt =
extern "C" int printf (const char *, ...);
int main()
{
int j = 0, k = 0;
1 ? j : k = 5; // should be parsed 1 ? j : (k = 5)
(void) (1 ? k = 5 : 0);
k = 5 ? 1 : 0; // should be parsed k = (5 ? 1 : 0)
printf ("%d %d\n", j, k);
return j == 5 || k == 5;
}