1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
5 void (*abc_call
)(void);
9 * Use only any one of the three definitions below at a time:
11 * 1. nothing optimized away. Good.
12 * 2. call_func() _not_ optimized away, but struct xyz is. gcc disappoints.
13 * 3. both call_func() and struct xyz optimized away. Nice.
17 /*extern int do_register(struct abc *xyz);*/
20 static inline int do_register(struct abc
*xyz
)
26 /*#define do_register(xyz) do { (void)(xyz); } while (0)*/
28 static void call_func(void)
32 static struct abc xyz
= {
33 .abc_call
= call_func
,
41 /* { dg-final { scan-tree-dump-not "call_func" "optimized"} } */