Bug 43191 - [4.5 Regression] ice in load_assign_lhs_subreplacements, at tree-sra.c:2459
Summary: [4.5 Regression] ice in load_assign_lhs_subreplacements, at tree-sra.c:2459
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.5.0
: P1 normal
Target Milestone: 4.5.0
Assignee: Martin Jambor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-26 15:42 UTC by John Regehr
Modified: 2010-03-04 18:17 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2010-03-02 14:56:08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Regehr 2010-02-26 15:42:46 UTC
regehr@john-home:~/volatile/bugs/tmp271$ current-gcc -O2 -c small.c

small.c: In function ‘func_70’:
small.c:46:1: internal compiler error: in load_assign_lhs_subreplacements, at tree-sra.c:2459
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

regehr@john-home:~/volatile/bugs/tmp271$ cat small.c

struct S0
{
};

struct S1
{
  unsigned f0:27;
  const unsigned:0;
};

struct S2
{
  unsigned f2:1;
};

unsigned char g_4[1][8][3][1][1][1];
unsigned char *g_17;
unsigned char **g_16[1][10][7];

struct S2 g_35 = {
  0
};

struct S2 *g_34 = &g_35;

struct S1 func_86 (unsigned char p_87, struct S2 **p_89)
{
  struct S1 l_92[6][8][1][1] = {
    16143586
  }
  ;
  return l_92[0][0][0][0];
}

void func_28 (struct S1 p_30, const struct S1 p_32)
{
}

void func_70 (unsigned char p_72)
{
  unsigned char *const *l_93 = &g_17;
  struct S2 **l_94;
  unsigned char *const *l_97 = &g_17;
  func_28 (func_86 (p_72, 0), 
	   func_86 (p_72, &g_34));
}

regehr@john-home:~/volatile/bugs/tmp271$ current-gcc -v

Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/home/regehr/z/tmp/gcc-r157079-install/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/tmp/gcc-r157079-install --program-prefix=r157079- --enable-languages=c,c++
Thread model: posix
gcc version 4.5.0 20100226 (experimental) (GCC)
Comment 1 Richard Biener 2010-02-26 15:46:09 UTC
Confirmed.
Comment 2 Martin Jambor 2010-03-02 14:56:08 UTC
Mine.
Comment 3 Martin Jambor 2010-03-04 11:25:01 UTC
Patch submitted to the mailing list:
http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00207.html
Comment 4 Martin Jambor 2010-03-04 18:16:46 UTC
Subject: Bug 43191

Author: jamborm
Date: Thu Mar  4 18:16:32 2010
New Revision: 157232

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157232
Log:
2010-03-04  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/43164
	PR tree-optimization/43191
	* tree-sra.c (type_consists_of_records_p): Reject records with
	zero-size bit-fields at the end.

	* testsuite/gcc.c-torture/compile/pr43164.c: New test.
	* testsuite/gcc.c-torture/compile/pr43191.c: Likewise.


Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr43164.c
    trunk/gcc/testsuite/gcc.c-torture/compile/pr43191.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-sra.c

Comment 5 Martin Jambor 2010-03-04 18:17:00 UTC
Fixed.
Comment 6 hjl@gcc.gnu.org 2010-03-13 16:59:31 UTC
Subject: Bug 43191

Author: hjl
Date: Sat Mar 13 16:58:19 2010
New Revision: 157426

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157426
Log:
Backport testcases from mainline.

2010-03-13  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2010-03-11  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/43257
	* g++.dg/torture/pr43257.C: New test.

	2010-03-11  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43255
	* gcc.c-torture/compile/pr43255.c: New testcase.

	2010-03-11  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.dg/pr43280.c: New testcase.

	2010-03-10  Jan Hubicka   <jh@suse.cz>

	* gcc.c-torture/compile/pr43288.c: New test.

	2010-03-10  Andrey Belevantsev  <abel@ispras.ru>

	PR middle-end/42859
	* g++.dg/eh/pr42859.C: New test.

	2010-03-09  Jakub Jelinek  <jakub@redhat.com>

	PR debug/43299
	* gcc.dg/pr43299.c: New test.

	2010-03-08  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43269
	* gcc.c-torture/execute/pr43269.c: New testcase.

	2010-03-04  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/43164
	PR tree-optimization/43191
	* gcc.c-torture/compile/pr43164.c: New test.
	* gcc.c-torture/compile/pr43191.c: Likewise.

	2010-03-04  Changpeng Fang  <changpeng.fang@amd.com>

	PR middle-end/43209
	* gcc.dg/tree-ssa/ivopts-4.c: New.

	2010-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR debug/43229
	* gfortran.dg/pr43229.f90: New test.

	PR debug/43237
	* gcc.dg/debug/dwarf2/pr43237.c: New test.

	2010-03-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/43180
	* gfortran.dg/internal_pack_10.f90: New test.

	2010-02-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43188
	* gcc.c-torture/compile/pr43188.c: New testcase.

	2010-02-25  Jakub Jelinek  <jakub@redhat.com>

	PR debug/43166
	* gfortran.dg/debug/pr43166.f: New test.

	PR debug/43165
	* gcc.dg/torture/pr43165.c: New test.

	2010-02-23  Jakub Jelinek  <jakub@redhat.com>

	PR target/43107
	* gcc.target/i386/pr43107.c: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/eh/pr42859.C
      - copied unchanged from r157425, trunk/gcc/testsuite/g++.dg/eh/pr42859.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr43257.C
      - copied unchanged from r157425, trunk/gcc/testsuite/g++.dg/torture/pr43257.C
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43164.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43164.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43188.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43188.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43191.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43191.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43255.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43255.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43288.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43288.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr43269.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/execute/pr43269.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43280.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/pr43280.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43299.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/pr43299.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/torture/pr43165.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/torture/pr43165.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/tree-ssa/ivopts-4.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/tree-ssa/ivopts-4.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr43107.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.target/i386/pr43107.c
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/debug/pr43166.f
      - copied unchanged from r157425, trunk/gcc/testsuite/gfortran.dg/debug/pr43166.f
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/internal_pack_10.f90
      - copied unchanged from r157425, trunk/gcc/testsuite/gfortran.dg/internal_pack_10.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr43229.f90
      - copied unchanged from r157425, trunk/gcc/testsuite/gfortran.dg/pr43229.f90
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog