Bug path

test
‘test’: events 1-2
23void test (void)
^~~~
|
(1) entry to ‘test’
[...]
26 signal(SIGINT, int_handler);
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
(2) registering ‘int_handler’ as signal handler
event 3
(3): later on, when the signal is delivered to the process
int_handler
‘int_handler’: events 4-5
18static void int_handler(int signum)
^~~~~~~~~~~
|
(4) entry to ‘int_handler’
19{
20 custom_logger("got signal");
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
(5) calling ‘custom_logger’ from ‘int_handler’
custom_logger
‘custom_logger’: events 6-7
13void custom_logger(const char *msg)
^~~~~~~~~~~~~
|
(6) entry to ‘custom_logger’
14{
15 fprintf(stderr, "LOG: %s", msg); /* { dg-warning "call to 'fprintf' from within signal handler" } */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
(7) call to ‘fprintf’ from within signal handler