aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-06-28 17:51:25 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-06-28 15:51:25 +0000
commit4021f4a1715a176805628c1dbe284617ff3e4a5f (patch)
tree566ef297863c2c3d100bc051850712fb8da54486 /gcc
parent621f418948dd050f09735532c098e46eaa1dfd69 (diff)
downloadgcc-4021f4a1715a176805628c1dbe284617ff3e4a5f.zip
gcc-4021f4a1715a176805628c1dbe284617ff3e4a5f.tar.gz
gcc-4021f4a1715a176805628c1dbe284617ff3e4a5f.tar.bz2
re PR tree-optimization/44687 (ICE: in tree_nrv, at tree-nrv.c:155 with -fprofile-generate)
PR tree-optimization/44687 * gcc.c-torture/compile/pr44687.c PR tree-optimization/44687 * ipa-split.c (split_function): Use DECL_RESULT to store return value. From-SVN: r161500
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-split.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr44687.c32
4 files changed, 43 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1b4f2d1..5bf683a8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-28 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/44687
+ * ipa-split.c (split_function): Use DECL_RESULT to store return value.
+
2010-06-28 Martin Jambor <mjambor@suse.cz>
PR c++/44535
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index ccc89c4..78895d0 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -928,9 +928,7 @@ split_function (struct split_point *split_point)
gimple ret;
if (!VOID_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl))))
{
- retval
- = create_tmp_var (TREE_TYPE (TREE_TYPE (current_function_decl)),
- "RET");
+ retval = DECL_RESULT (current_function_decl);
if (is_gimple_reg (retval))
retval = make_ssa_name (retval, call);
gimple_call_set_lhs (call, retval);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3326446..d61073a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-28 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/44687
+ * gcc.c-torture/compile/pr44687.c
+
2010-06-28 Martin Jambor <mjambor@suse.cz>
PR c++/44535
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44687.c b/gcc/testsuite/gcc.c-torture/compile/pr44687.c
new file mode 100644
index 0000000..f59c2ef
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44687.c
@@ -0,0 +1,32 @@
+typedef int int32_t;
+typedef unsigned char uint8_t;
+struct S0
+{
+ uint8_t f0;
+};
+struct S0 *g_18[7][5][1][1] = {
+};
+
+struct S0 **g_17 = &g_18[0][3][0][0];
+int32_t g_86;
+struct S0 func_72 (uint8_t p_73, struct S0 p_74);
+
+void int326 (struct S0 **p_67, int32_t p_68, int32_t * *const p_69,
+ struct S0 *p_70)
+{
+ struct S0 l_95 = {
+ -1L
+ };
+ func_72 (1L, func_72 (0, l_95));
+}
+
+struct S0
+func_72 (uint8_t p_73, struct S0 p_74)
+{
+ int32_t *l_85 = &g_86;
+ if (*l_85)
+ lbl_94:*l_85 ^= 0;
+ if (g_86)
+ goto lbl_94;
+ return **g_17;
+}