1 /* Checks for a bug where a function with a section attribute would prevent
2 all later functions from being partitioned into hot and cold blocks. */
3 /* { dg-require-effective-target freorder } */
4 /* { dg-options "-O2 -fno-profile-reorder-functions -freorder-blocks-and-partition -save-temps" } */
8 #define NOINLINE __attribute__((noinline)) __attribute__ ((noclone))
10 const char *sarr
[SIZE
];
16 __attribute__((section(".text")))
18 main (int argc
, char *argv
[])
23 for (i
= 0; i
< 1000000; i
++)
35 for (i
= 0; i
< SIZE
; i
++)
40 for (i
= 0; i
< SIZE
; i
++)
45 /* { dg-final-use { scan-assembler "\.section\[\t \]*\.text\.unlikely\[\\n\\r\]+\[\t \]*\.size\[\t \]*foo\.cold\.0" { target *-*-linux* *-*-gnu* } } } */