* expr2.C: New test.
From-SVN: r34234
This commit is contained in:
parent
e801c5c267
commit
7fcc15aa32
2 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
|
||||
|
||||
* expr2.C: New test.
|
||||
|
||||
2000-04-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
|
||||
|
||||
* stkalign.C: New test.
|
||||
|
|
18
gcc/testsuite/g++.old-deja/g++.oliva/expr2.C
Normal file
18
gcc/testsuite/g++.old-deja/g++.oliva/expr2.C
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2000 Free Software Foundation
|
||||
|
||||
// by Alexandre Oliva <aoliva@cygnus.com>
|
||||
|
||||
// execution test - XFAIL *-*-*
|
||||
|
||||
int i, j;
|
||||
|
||||
const int &f(const int& I, const int& J) {
|
||||
// this must not be optimized to I because it's an lvalue
|
||||
return (I != J) ? I : J;
|
||||
}
|
||||
|
||||
int main () {
|
||||
if (&f(i, j) != &j)
|
||||
abort ();
|
||||
exit (0);
|
||||
}
|
Loading…
Add table
Reference in a new issue