Bug 39960 - [4.5 Regression] struct-reorg is broken
Summary: [4.5 Regression] struct-reorg is broken
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-checking, ice-on-valid-code, wrong-code
Depends on:
Blocks: 39932
  Show dependency treegraph
 
Reported: 2009-04-29 14:26 UTC by Richard Biener
Modified: 2009-11-21 22:08 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-11-16 16:38:21


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2009-04-29 14:26:43 UTC
FAIL: gcc.dg/struct/wo_prof_double_malloc.c (internal compiler error)
FAIL: gcc.dg/struct/wo_prof_double_malloc.c (internal compiler error)
FAIL: gcc.dg/struct/wo_prof_double_malloc.c (test for excess errors)
FAIL: gcc.dg/struct/wo_prof_double_malloc.c (test for excess errors)

/space/rguenther/src/svn/trunk/gcc/testsuite/gcc.dg/struct/wo_prof_double_malloc.c:26: error: non-trivial conversion at assignment^M
struct type_struct *^M
struct test_struct_sub.1 *^M
# .MEM_41 = VDEF <.MEM_18>^M
*D.3347_31 = D.3349_40;^M
^M

struct-reorg doesn't bother to update reference trees properly and creates
invalid gimple.
Comment 1 Hans-Peter Nilsson 2009-04-30 01:25:49 UTC
Confirmed at r146982 for cris-elf.
Comment 2 Janis Johnson 2009-07-08 20:46:39 UTC
On powerpc*-linux the test begins to fail in the same way with this patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=146831

    r146831 | rguenth | 2009-04-27 11:18:38 +0000 (Mon, 27 Apr 2009)
Comment 3 Janis Johnson 2009-07-08 21:29:15 UTC
The test started failing with the patch reported in comment #2 because it enabled type checking; sorry for the noise.
Comment 4 Richard Biener 2009-09-23 16:22:42 UTC
Likewise.  Not really P1 as user-visible only with checking enabled.  Not a
regression is the wrong-code part as IPA struct-reorg was creating TBAA
wrong-code since ever, now made visible via type-checking.
Comment 5 Olga Golovanevsky 2009-11-17 13:47:31 UTC
This patch should solve the problem. Please confirm for your platforms.

http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00849.html

Thanks,
Olga
Comment 6 olga 2009-11-20 16:57:48 UTC
Subject: Bug 39960

Author: olga
Date: Fri Nov 20 16:57:35 2009
New Revision: 154374

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154374
Log:
2009-11-17 Olga Golovanevsky <olga@il.ibm.com>

	PR middle-end/39960
	* ipa-struct-reorg.c (find_pos_in_stmt): New parameter.
	(ref_pos): New field in structure.
	(insert_new_var_in_stmt): New function.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-struct-reorg.c

Comment 7 H.J. Lu 2009-11-21 22:08:33 UTC
Fixed.