1 /* $NetBSD: gcc_attribute_label.c,v 1.2 2021/07/11 19:24:42 rillig Exp $ */ 2 # 3 "gcc_attribute_label.c" 3 4 /* 5 * Tests for the GCC __attribute__ for labels. 6 * 7 * https://gcc.gnu.org/onlinedocs/gcc/Label-Attributes.html 8 */ 9 10 void dead(void); 11 12 void 13 test(int i) 14 { 15 if (i < 1000) 16 goto hot; 17 error: 18 __attribute__((__cold__)); 19 dead(); 20 21 hot: 22 __attribute__((__hot__)); 23 if (i < 0) 24 goto error; 25 } 26