1 /* Functional tests for the function hotpatching feature. */ 2 3 /* { dg-do compile } */ 4 /* { dg-options "-O3 -mzarch -mhotpatch=1000000,1000000" } */ 5 6 #include <stdio.h> 7 hp1(void)8void hp1(void) 9 { 10 printf("hello, world!\n"); 11 } 12 13 __attribute__ ((hotpatch(1000000,1000000))) hp2(void)14void hp2(void) 15 { 16 printf("hello, world!\n"); 17 } 18 19 __attribute__ ((hotpatch(1000001,1000000))) hp3(void)20void hp3(void) 21 { /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */ 22 printf("hello, world!\n"); 23 } 24 25 __attribute__ ((hotpatch(1000000,1000001))) hp4(void)26void hp4(void) 27 { /* { dg-error " requested .hotpatch. attribute is not a comma separated pair" } */ 28 printf("hello, world!\n"); 29 } 30