aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gcc.gnu.org>2019-03-10 16:29:48 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-03-10 16:29:48 +0000
commit1c63105c0cfc9d75b3c07bcb242a2863003874d3 (patch)
tree99c2fc566450619586d32b348d137008676b4bed /gcc/testsuite/gdc.test
parentb496651b7d281bd1bf22688f4de0cbb78c1bf8e5 (diff)
downloadgcc-1c63105c0cfc9d75b3c07bcb242a2863003874d3.zip
gcc-1c63105c0cfc9d75b3c07bcb242a2863003874d3.tar.gz
gcc-1c63105c0cfc9d75b3c07bcb242a2863003874d3.tar.bz2
re PR d/88958 (ICE in walk_aliased_vdefs_1, at tree-ssa-alias.c:2887)
PR d/88958 d/dmd: Merge upstream dmd 0fc786f49 Backport fix to disallow passing functions as parameters. Fixes https://gcc.gnu.org/PR88958 Reviewed-on: https://github.com/dlang/dmd/pull/9437 From-SVN: r269557
Diffstat (limited to 'gcc/testsuite/gdc.test')
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test19608.d16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test19608.d b/gcc/testsuite/gdc.test/fail_compilation/test19608.d
new file mode 100644
index 0000000..cea84a6
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test19608.d
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=19608
+/*
+TEST_OUTPUT:
+---
+fail_compilation/test19608.d(15): Error: cannot pass function `*& f` as a function argument
+---
+*/
+import core.stdc.stdarg;
+
+void f(int) {}
+void g(...) {}
+void h()
+{
+ g(&f); // OK, function address
+ g(*&f); // ICE -> Error
+}