aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386/pr18900b.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-i386/pr18900b.c')
-rw-r--r--ld/testsuite/ld-i386/pr18900b.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/pr18900b.c b/ld/testsuite/ld-i386/pr18900b.c
new file mode 100644
index 0000000..e666305
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr18900b.c
@@ -0,0 +1,22 @@
+extern void abort (void);
+extern void foo (void);
+extern void *bar (void);
+
+typedef void (*func_p) (void);
+
+extern const func_p p1;
+
+func_p p2 = &foo;
+func_p p3 = &foo;
+
+int
+main ()
+{
+ void *p = bar ();
+ p1 ();
+ p2 ();
+ p3 ();
+ if (p != p1)
+ abort ();
+ return 0;
+}