Bug 29637 - [4.0/4.1/4.2/4.3 Regression] Endless recursion in make_vector_type
Summary: [4.0/4.1/4.2/4.3 Regression] Endless recursion in make_vector_type
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.0.4
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 29638 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-29 20:46 UTC by Jakub Jelinek
Modified: 2006-10-30 08:11 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2006-10-29 20:46:36 UTC
PR29092 fix causes a regression:
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize" } */

typedef struct __attribute__ ((aligned (8)))
{
    short a, b, c, d;
} A;

typedef struct
{
  A a[24];
} B;

static const A b = { 0, 0, 1, -1 };

void
foo (B *x)
{
  int i;
  for (i = 0; i <= 20; i += 4)
    x->a[i] = b;
}

results in endless recursion in make_vector_type.  The RECORD_TYPE type has
attributes, but as any record type TYPE_MAIN_VARIANT of it is itself.
Comment 1 Andrew Pinski 2006-10-29 20:53:48 UTC

*** This bug has been marked as a duplicate of 29638 ***
Comment 2 Jakub Jelinek 2006-10-30 08:01:42 UTC
Subject: Bug 29637

Author: jakub
Date: Mon Oct 30 08:01:28 2006
New Revision: 118175

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118175
Log:
	PR tree-optimization/29637
	* tree.c (make_vector_type): Don't recurse if TYPE_MAIN_VARIANT
	of the innertype is the innertype itself.

	* gcc.dg/pr29637.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr29637.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c

Comment 3 Jakub Jelinek 2006-10-30 08:04:05 UTC
Subject: Bug 29637

Author: jakub
Date: Mon Oct 30 08:03:50 2006
New Revision: 118176

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118176
Log:
	PR tree-optimization/29637
	* tree.c (make_vector_type): Don't recurse if TYPE_MAIN_VARIANT
	of the innertype is the innertype itself.

	* gcc.dg/pr29637.c: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/pr29637.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/tree.c

Comment 4 Jakub Jelinek 2006-10-30 08:05:13 UTC
Subject: Bug 29637

Author: jakub
Date: Mon Oct 30 08:04:58 2006
New Revision: 118177

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118177
Log:
	PR tree-optimization/29637
	* tree.c (make_vector_type): Don't recurse if TYPE_MAIN_VARIANT
	of the innertype is the innertype itself.

	* gcc.dg/pr29637.c: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr29637.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/tree.c

Comment 5 Jakub Jelinek 2006-10-30 08:08:54 UTC
Subject: Bug 29637

Author: jakub
Date: Mon Oct 30 08:08:41 2006
New Revision: 118178

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118178
Log:
	PR tree-optimization/29637
	* tree.c (make_vector_type): Don't recurse if TYPE_MAIN_VARIANT
	of the innertype is the innertype itself.

	* gcc.dg/pr29637.c: New test.

Added:
    branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/pr29637.c
Modified:
    branches/gcc-4_0-branch/gcc/ChangeLog
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_0-branch/gcc/tree.c

Comment 6 Jakub Jelinek 2006-10-30 08:10:30 UTC
Oops, sorry for the dup.
Comment 7 Jakub Jelinek 2006-10-30 08:10:58 UTC
Fixed now in SVN.
Comment 8 Jakub Jelinek 2006-10-30 08:11:38 UTC
*** Bug 29638 has been marked as a duplicate of this bug. ***