On Sep 14, 2014, at 10:51 AM, Andi Kleen <a...@firstfloor.org> wrote: > From: Andi Kleen <a...@linux.intel.com> > > Add some simple test cases for noreorder behaving like > -fno-toplevel-reorder and -fno-toplevel-reorder still working. > Unfortunately there's no easy way to check for output order in DG, > so we just check for existence.
I thought some of these would span lines…. foo.*bar could check foo on a line before bar? /* { dg-final { scan-assembler "section.*foo" } } */ int foo (int a) { static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 }; void *p = &&l1 + ar[a]; goto *p; l1: return 1; l2: return 2; } Yup, works just fine. Some might say it isn’t a feature, but we have no plans to fix it.