public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/19164] New: ICE in digest_init or build_vector
@ 2004-12-27 13:13 jakub at gcc dot gnu dot org
2004-12-28 20:57 ` [Bug middle-end/19164] [3.3/3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-12-27 13:13 UTC (permalink / raw)
To: gcc-bugs
--- gcc/testsuite/gcc.dg/20041227-1.c.jj 2004-12-27 13:57:19.126504511
+0100
+++ gcc/testsuite/gcc.dg/20041227-1.c 2004-12-27 13:57:15.864087556 +0100
@@ -0,0 +1,5 @@
+/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-mmmx" } */
+
+typedef short int V __attribute__ ((vector_size (8)));
+static V v = (V) 0x00FF00FF00FF00FFLL;
gives ICE in both GCC 3.4.3-RH and on HEAD. Depending whether checking is
enabled or not, it either results in checking failure in digest_init or
in a segfault in build_vector.
The problematic hunk is (c-typeck.c (digest_init)):
/* Build a VECTOR_CST from a *constant* vector constructor. If the
vector constructor is not constant (e.g. {1,2,3,foo()}) then punt
below and handle as a constructor. */
if (code == VECTOR_TYPE
&& TREE_CODE (TREE_TYPE (inside_init)) == VECTOR_TYPE
&& vector_types_convertible_p (TREE_TYPE (inside_init), type)
&& TREE_CONSTANT (inside_init))
{
if (TREE_CODE (inside_init) == VECTOR_CST
&& comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
TYPE_MAIN_VARIANT (type)))
return inside_init;
else
return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
}
Changing it to else if (TREE_CODE (inside_init) == CONSTRUCTOR)
return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
else
return inside_init;
fixes this, but I have trouble to understand what the code really wants to do.
If inside_init is a VECTOR_CST, then if comptypes returns 0, this results
in a checking failure too, as a VECTOR_CST is not a CONSTRUCTOR and
CONSTRUCTOR_ELTS is solely for CONSTRUCTORs. So, either the inner test should
be only if (TREE_CODE (inside_init) == CONSTRUCTOR) return build_vector ...; else
return inside_init; with no checking for VECTOR_CST etc., or there needs to
be different actions for VECTOR_CST that are compatible, for those where
comptypes on TREE_TYPE (inside_init) and type gives non-zero, but for their
main variants gives zero (is that even possible?), for CONSTRUCTORS and for
other trees that can end up in that place (the testcase here has there a
NOP_EXPR with INTEGER_CST inside).
--
Summary: ICE in digest_init or build_vector
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,rth at redhat dot com
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/19164] [3.3/3.4/4.0 Regression] ICE in digest_init or build_vector
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
@ 2004-12-28 20:57 ` pinskia at gcc dot gnu dot org
2005-01-13 18:17 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-28 20:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-28 20:57 -------
This is a regression on all of the open branches.
: Search converges between 2003-07-24-3.3 (#133) and 2003-07-25-3.3 (#134).
: Search converges between 2003-03-31-trunk (#217) and 2003-04-01-trunk (#218).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |3.3.1 3.4.0 4.0.0
Known to work| |3.3
Last reconfirmed|0000-00-00 00:00:00 |2004-12-28 20:57:28
date| |
Summary|ICE in digest_init or |[3.3/3.4/4.0 Regression] ICE
|build_vector |in digest_init or
| |build_vector
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/19164] [3.3/3.4/4.0 Regression] ICE in digest_init or build_vector
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
2004-12-28 20:57 ` [Bug middle-end/19164] [3.3/3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-01-13 18:17 ` pinskia at gcc dot gnu dot org
2005-01-19 9:28 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-13 18:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-13 18:17 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00739.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/19164] [3.3/3.4/4.0 Regression] ICE in digest_init or build_vector
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
2004-12-28 20:57 ` [Bug middle-end/19164] [3.3/3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2005-01-13 18:17 ` pinskia at gcc dot gnu dot org
@ 2005-01-19 9:28 ` cvs-commit at gcc dot gnu dot org
2005-01-19 9:45 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-19 9:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-19 09:27 -------
Subject: Bug 19164
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jakub@gcc.gnu.org 2005-01-19 09:27:24
Modified files:
gcc : ChangeLog c-typeck.c gimplify.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/compile: 20050113-1.c
gcc/testsuite/gcc.dg: 20050113-1.c
Log message:
PR c/17297
* c-typeck.c (digest_init): Only call build_vector if all constructor
elements are *_CST nodes.
* gimplify.c (gimplify_init_constructor): Likewise.
* gcc.c-torture/compile/20050113-1.c: New testcase.
PR middle-end/19164
* c-typeck.c (digest_init): Only call build_vector if inside_init
is a CONSTRUCTOR.
* gcc.dg/20050113-1.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7183&r2=2.7184
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.410&r2=1.411
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.103&r2=2.104
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4907&r2=1.4908
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20050113-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20050113-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/19164] [3.3/3.4/4.0 Regression] ICE in digest_init or build_vector
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-01-19 9:28 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-19 9:45 ` cvs-commit at gcc dot gnu dot org
2005-01-19 9:53 ` [Bug middle-end/19164] [3.3 " jakub at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-19 9:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-19 09:45 -------
Subject: Bug 19164
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: jakub@gcc.gnu.org 2005-01-19 09:44:49
Modified files:
gcc : ChangeLog c-typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/compile: 20050113-1.c
gcc/testsuite/gcc.dg: 20050113-1.c
Log message:
PR c/17297
* c-typeck.c (digest_init): Only call build_vector if all constructor
elements are *_CST nodes.
* gcc.c-torture/compile/20050113-1.c: New testcase.
PR middle-end/19164
* c-typeck.c (digest_init): Only call build_vector if inside_init
is a CONSTRUCTOR.
* gcc.dg/20050113-1.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.777&r2=2.2326.2.778
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.272.2.12&r2=1.272.2.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.346&r2=1.3389.2.347
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20050113-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/20050113-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/19164] [3.3 Regression] ICE in digest_init or build_vector
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-01-19 9:45 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-19 9:53 ` jakub at gcc dot gnu dot org
2005-04-30 13:16 ` gdr at gcc dot gnu dot org
2005-04-30 13:23 ` gdr at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-19 9:53 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.4 |3.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/19164] [3.3 Regression] ICE in digest_init or build_vector
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-01-19 9:53 ` [Bug middle-end/19164] [3.3 " jakub at gcc dot gnu dot org
@ 2005-04-30 13:16 ` gdr at gcc dot gnu dot org
2005-04-30 13:23 ` gdr at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 13:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2005-04-30 13:16 -------
Not critical for 3.3.6
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.3.6 |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/19164] [3.3 Regression] ICE in digest_init or build_vector
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-04-30 13:16 ` gdr at gcc dot gnu dot org
@ 2005-04-30 13:23 ` gdr at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 13:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2005-04-30 13:23 -------
fixed on 3.4.x
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19164
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-04-30 13:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-27 13:13 [Bug middle-end/19164] New: ICE in digest_init or build_vector jakub at gcc dot gnu dot org
2004-12-28 20:57 ` [Bug middle-end/19164] [3.3/3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2005-01-13 18:17 ` pinskia at gcc dot gnu dot org
2005-01-19 9:28 ` cvs-commit at gcc dot gnu dot org
2005-01-19 9:45 ` cvs-commit at gcc dot gnu dot org
2005-01-19 9:53 ` [Bug middle-end/19164] [3.3 " jakub at gcc dot gnu dot org
2005-04-30 13:16 ` gdr at gcc dot gnu dot org
2005-04-30 13:23 ` gdr at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).