* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / sizeof3.C
blobbceb7317a1c3999a44bd1a8835eda5420b5598e5
1 // { dg-do run  }
2 // Copyright (C) 1999 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 5 Sep 1999 <nathan@acm.org>
5 // C++ does not decay lvalues into rvalues until as late as possible. This
6 // means things like the rhs of a comma operator mustn't decay. This will make
7 // a difference if it is an array or function.
9 extern "C" void abort();
11 int main (int argc, char **argv)
13   int ary[10];
14   int ary1[10];
15   
16   if (sizeof (0,ary) != sizeof (ary))
17     abort ();
18   if (sizeof (argc ? ary : ary1) != sizeof (ary))
19     abort ();
20   return 0;