re PR middle-end/79732 (ICE in set_ssa_default_def, at tree-dfa.c:327)
authorRichard Biener <rguenther@suse.de>
Tue, 28 Feb 2017 12:38:57 +0000 (12:38 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 28 Feb 2017 12:38:57 +0000 (12:38 +0000)
2017-02-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79732
* tree-inline.c (expand_call_inline): Do not shadow var.

* gcc.dg/torture/pr79732.c: New testcase.

From-SVN: r245773

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr79732.c [new file with mode: 0644]
gcc/tree-inline.c

index a98a08e2fb47b13bf2f55fc2cc6b7152500ef77b..96e150896dfc514831a397ced421e332b6c4200a 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-28  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/79732
+       * tree-inline.c (expand_call_inline): Do not shadow var.
+
 2017-02-28  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/79723
index 8c0514c7996dd8e8e2e0a2039f9ce14f126c75c5..b616b8a1738b052c431b960eaf96f15833a03bc7 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-28  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/79732
+       * gcc.dg/torture/pr79732.c: New testcase.
+
 2017-02-28  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/79723
diff --git a/gcc/testsuite/gcc.dg/torture/pr79732.c b/gcc/testsuite/gcc.dg/torture/pr79732.c
new file mode 100644 (file)
index 0000000..7231ba4
--- /dev/null
@@ -0,0 +1,5 @@
+/* { dg-do link } */
+
+int bar () __attribute__ ((alias ("foo")));
+void foo () { }
+int main () { return bar(); }
index 138b992552e793ac6d6cf279a4c8374b212aef57..bd4b48e8623e5a9db00b42b2539f42c0a198e726 100644 (file)
@@ -4782,7 +4782,7 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
            {
              if (!var)
                {
-                 tree var = create_tmp_reg_fn (cfun, TREE_TYPE (name), NULL);
+                 var = create_tmp_reg_fn (cfun, TREE_TYPE (name), NULL);
                  SET_SSA_NAME_VAR_OR_IDENTIFIER (name, var);
                }
              /* Otherwise make this variable undefined.  */