comparison gcc/testsuite/gcc.dg/tree-prof/section-attr-3.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
7 #define SIZE 10000 7 #define SIZE 10000
8 8
9 #define NOINLINE __attribute__((noinline)) __attribute__ ((noclone)) 9 #define NOINLINE __attribute__((noinline)) __attribute__ ((noclone))
10 10
11 const char *sarr[SIZE]; 11 const char *sarr[SIZE];
12 #ifdef __APPLE__
13 const char *buf_hot __attribute__ ((section ("__DATA,__data")));
14 #else
12 const char *buf_hot __attribute__ ((section (".data"))); 15 const char *buf_hot __attribute__ ((section (".data")));
16 #endif
13 const char *buf_cold; 17 const char *buf_cold;
14 18
15 void foo (int path); 19 void foo (int path);
16 20
17 int 21 int
41 sarr[i] = buf_cold; 45 sarr[i] = buf_cold;
42 } 46 }
43 } 47 }
44 48
45 /* { dg-final-use { scan-assembler "\.section\[\t \]*\.text\.unlikely\[\\n\\r\]+\[\t \]*\.size\[\t \]*foo\.cold\.0" { target *-*-linux* *-*-gnu* } } } */ 49 /* { dg-final-use { scan-assembler "\.section\[\t \]*\.text\.unlikely\[\\n\\r\]+\[\t \]*\.size\[\t \]*foo\.cold\.0" { target *-*-linux* *-*-gnu* } } } */
50 /* { dg-final-use { scan-assembler "\.section\[\t \]*__TEXT,__text_cold\.\*\[\\n\\r\]+_foo\.cold\.0:" { target *-*-darwin* } } } */