aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2016-08-09 18:05:30 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2016-08-09 18:05:30 +0200
commit04d6d3b6d77d247616543dedad7ee239368591a5 (patch)
treefb415bd7783c05576d00d25478e6a73a42af2380 /gcc/testsuite/gcc.dg
parent045f240b97c75ad7e8f27a6464ae5b6857128fbe (diff)
downloadgcc-04d6d3b6d77d247616543dedad7ee239368591a5.zip
gcc-04d6d3b6d77d247616543dedad7ee239368591a5.tar.gz
gcc-04d6d3b6d77d247616543dedad7ee239368591a5.tar.bz2
[PR ipa/71981] Make get_dynamic_type grok MEM_REF
2016-08-09 Martin Jambor <mjambor@suse.cz> PR ipa/71981 * ipa-polymorphic-call.c (get_dynamic_type): Bail out gracefully if instance is a MEM_REF. testsuite/ PR ipa/71981 * gcc.dg/ipa/pr71981.c: New test. From-SVN: r239294
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr71981.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/pr71981.c b/gcc/testsuite/gcc.dg/ipa/pr71981.c
new file mode 100644
index 0000000..1b21602
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr71981.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+
+int **a;
+static void fn1(char **p1) {
+ char s = *p1, b = &s;
+ while (*fn2()[a])
+ ;
+}
+int main() { fn1(""); return 0; }