summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr48213.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr48213.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr48213.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr48213.c b/gcc/testsuite/gcc.dg/pr48213.c
new file mode 100644
index 000000000..cf7d76fa0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr48213.c
@@ -0,0 +1,14 @@
+/* PR target/48213 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2" } */
+/* { dg-options "-g -O2 -fpic" { target fpic } } */
+
+struct S { int (*s) (void); };
+int bar (void);
+
+void
+foo (struct S *x)
+{
+ if (x->s != bar)
+ bar ();
+}