public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr
@ 2005-04-03 14:29 steven at gcc dot gnu dot org
2005-04-03 14:33 ` [Bug middle-end/20739] " steven at gcc dot gnu dot org
` (18 more replies)
0 siblings, 19 replies; 20+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-03 14:29 UTC (permalink / raw)
To: gcc-bugs
$ cat t.c
typedef struct
{
char chars[5];
}
baz_t;
extern baz_t * baz;
extern void foo (baz_t);
int
bar (const baz_t * ls)
{
foo (ls == 0 ? *(&baz[0]) : *ls);
}
$ ./cc1 -O t.c -Wall
bar
t.c: In function 'bar':
t.c:13: internal compiler error: in gimplify_addr_expr, at gimplify.c:3246
This is GCC 4.1.0 20050403 on (i686-pc-linux-gnu).
The problem showed up in ncurses.
--
Summary: [4.0/4.1 regression] ICE in gimplify_addr_expr
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steven at gcc dot gnu dot org
CC: aj at suse dot de,gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
@ 2005-04-03 14:33 ` steven at gcc dot gnu dot org
2005-04-03 14:49 ` steven at gcc dot gnu dot org
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-03 14:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-04-03 14:33 -------
C ICE-on-valid bugs are release critical.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Priority|P2 |P1
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
2005-04-03 14:33 ` [Bug middle-end/20739] " steven at gcc dot gnu dot org
@ 2005-04-03 14:49 ` steven at gcc dot gnu dot org
2005-04-03 15:32 ` steven at gcc dot gnu dot org
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-03 14:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-04-03 14:49 -------
We ICE on an assert:
#ifdef ENABLE_CHECKING
tree t_op0 = TREE_TYPE (op0);
gcc_assert ((TREE_CODE (t_op0) == ARRAY_TYPE
&& POINTER_TYPE_P (t_expr)
&& cpt_same_type (TREE_TYPE (t_op0),
TREE_TYPE (t_expr))
&& POINTER_TYPE_P (t_op00)
&& cpt_same_type (t_op0, TREE_TYPE (t_op00))) || 1);
#endif
Without the assert, the compilation continues and appears to produce the
right code too. What is the rationale for this assert??
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
2005-04-03 14:33 ` [Bug middle-end/20739] " steven at gcc dot gnu dot org
2005-04-03 14:49 ` steven at gcc dot gnu dot org
@ 2005-04-03 15:32 ` steven at gcc dot gnu dot org
2005-04-03 16:53 ` pinskia at gcc dot gnu dot org
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-03 15:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-04-03 15:32 -------
Introduced by rth's patch http://gcc.gnu.org/ml/gcc-cvs/2004-09/msg00682.html.
If this patch was ever posted to gcc-patches, I can't find the mail for it.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-04-03 15:32 ` steven at gcc dot gnu dot org
@ 2005-04-03 16:53 ` pinskia at gcc dot gnu dot org
2005-04-03 17:12 ` pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-03 16:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-03 16:53 -------
Confirmed.
Note you don't even have to include the *(&a) part either:
typedef struct
{
char chars[5];
}
baz_t;
extern baz_t * baz;
extern void foo (baz_t);
int
bar (const baz_t * ls)
{
foo (ls == 0 ? *baz : *ls);
}
But the above worked with "4.0.0 20050225" so something more recent introduced the problem.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-04-03 16:53:11
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-04-03 16:53 ` pinskia at gcc dot gnu dot org
@ 2005-04-03 17:12 ` pinskia at gcc dot gnu dot org
2005-04-04 9:18 ` steven at gcc dot gnu dot org
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-03 17:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-03 17:12 -------
(In reply to comment #4)
> But the above worked with "4.0.0 20050225" so something more recent introduced the problem.
Even the the orginal testcase works with that above version too.
I am thinking this was caused by:
2005-03-14 Alexandre Oliva <aoliva@redhat.com>
PR c++/20280
* gimplify.c (gimplify_cond_expr): Add fallback argument. Use a
temporary variable of pointer type if an lvalues is required.
(gimplify_modify_expr_rhs): Request an rvalue from it.
(gimplify_expr): Pass fallback on.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-04-03 17:12 ` pinskia at gcc dot gnu dot org
@ 2005-04-04 9:18 ` steven at gcc dot gnu dot org
2005-04-04 10:17 ` aoliva at gcc dot gnu dot org
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-04 9:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-04-04 09:18 -------
Removing the patch mentioned in comment #5 indeed makes this bug go away.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-04-04 9:18 ` steven at gcc dot gnu dot org
@ 2005-04-04 10:17 ` aoliva at gcc dot gnu dot org
2005-04-04 13:09 ` steven at gcc dot gnu dot org
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2005-04-04 10:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |aoliva at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-04-03 16:53:11 |2005-04-04 10:17:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-04-04 10:17 ` aoliva at gcc dot gnu dot org
@ 2005-04-04 13:09 ` steven at gcc dot gnu dot org
2005-04-07 9:06 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-04 13:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-04-04 13:09 -------
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00321.html
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-04-04 13:09 ` steven at gcc dot gnu dot org
@ 2005-04-07 9:06 ` pinskia at gcc dot gnu dot org
2005-04-12 17:58 ` mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-07 9:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-07 09:05 -------
*** Bug 20809 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |marcus at jet dot franken
| |dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-04-07 9:06 ` pinskia at gcc dot gnu dot org
@ 2005-04-12 17:58 ` mmitchel at gcc dot gnu dot org
2005-04-14 17:03 ` aoliva at redhat dot com
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-12 17:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-04-12 17:58 -------
Alexandre --
Did the patch in this PR pass testing? If so, Roger might be willing to review it.
-- Mark
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |roger at eyesopen dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-04-12 17:58 ` mmitchel at gcc dot gnu dot org
@ 2005-04-14 17:03 ` aoliva at redhat dot com
2005-04-14 17:19 ` roger at eyesopen dot com
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: aoliva at redhat dot com @ 2005-04-14 17:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aoliva at gcc dot gnu dot org 2005-04-14 17:03 -------
Subject: Re: [PR middle-end/20739] lvalue cond-expr gimplification may crash on cv-qual diffs
On Apr 4, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:
> If the operands of a cond-expr used as an lvalue differ in cv
> qualification, the front-end adds nop_exprs to add cv qualifiers that
> the gimplifier drops when simplifying &(T const)*v. The `&' was added
> by gimplify_cond_expr.
> The problem is that gimplify_addr_expr gimplifies its operand in such
> a way that the nop_expr is dropped, and nothing puts it back in, so
> when we test that, in the indirect_ref case in gimplify_addr_expr, the
> types are compatible, the test fails because of the missing
> cv-qualifier in the pointed-to type. This patch fixes this.
> Ok to install if bootstrap and regtest on amd64-linux-gnu pass?
Bootstrap and regtest pased on amd64-linux-gnu, at least for mainline.
I'm retesting on the branch, since I'm not entirely sure I actually
tested it there.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
PR middle-end/20739
* gimplify.c (gimplify_addr_expr): Compensate for removal of
e.g. cv-qualification conversions.
Index: gcc/gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gimplify.c,v
retrieving revision 2.122
diff -u -p -r2.122 gimplify.c
--- gcc/gimplify.c 1 Apr 2005 03:42:41 -0000 2.122
+++ gcc/gimplify.c 4 Apr 2005 11:28:04 -0000
@@ -3229,6 +3232,9 @@ gimplify_addr_expr (tree *expr_p, tree *
builtins like __builtin_va_end). */
/* Caution: the silent array decomposition semantics we allow for
ADDR_EXPR means we can't always discard the pair. */
+ /* Gimplification of the ADDR_EXPR operand may drop
+ cv-qualification conversions, so make sure we add them if
+ needed. */
{
tree op00 = TREE_OPERAND (op0, 0);
tree t_expr = TREE_TYPE (expr);
@@ -3238,9 +3244,9 @@ gimplify_addr_expr (tree *expr_p, tree *
{
#ifdef ENABLE_CHECKING
tree t_op0 = TREE_TYPE (op0);
- gcc_assert (TREE_CODE (t_op0) == ARRAY_TYPE
- && POINTER_TYPE_P (t_expr)
- && cpt_same_type (TREE_TYPE (t_op0),
+ gcc_assert (POINTER_TYPE_P (t_expr)
+ && cpt_same_type (TREE_CODE (t_op0) == ARRAY_TYPE
+ ? TREE_TYPE (t_op0) : t_op0,
TREE_TYPE (t_expr))
&& POINTER_TYPE_P (t_op00)
&& cpt_same_type (t_op0, TREE_TYPE (t_op00)));
Index: gcc/testsuite/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
PR middle-end/20739
* gcc.dg/tree-ssa/pr20739.c: New test.
Index: gcc/testsuite/gcc.dg/tree-ssa/pr20739.c
===================================================================
RCS file: gcc/testsuite/gcc.dg/tree-ssa/pr20739.c
diff -N gcc/testsuite/gcc.dg/tree-ssa/pr20739.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/tree-ssa/pr20739.c 4 Apr 2005 11:28:20 -0000
@@ -0,0 +1,24 @@
+/* PR middle-end/20739 */
+
+/* dg-do compile */
+/* dg-options "-O" */
+
+/* We used to fail to compile this because gimplification dropped the
+ conversion that added the const qualifier to the sub-expression
+ involving baz, and then immediately noticed and reported its
+ absence. */
+
+typedef struct
+{
+ char chars[5];
+}
+baz_t;
+
+extern baz_t * baz;
+
+extern void foo (baz_t);
+int
+bar (const baz_t * ls)
+{
+ foo (ls == 0 ? *(&baz[0]) : *ls);
+}
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-04-14 17:03 ` aoliva at redhat dot com
@ 2005-04-14 17:19 ` roger at eyesopen dot com
2005-04-15 2:32 ` aoliva at redhat dot com
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: roger at eyesopen dot com @ 2005-04-14 17:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From roger at eyesopen dot com 2005-04-14 17:19 -------
Thanks Alex! This is OK for mainline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (11 preceding siblings ...)
2005-04-14 17:19 ` roger at eyesopen dot com
@ 2005-04-15 2:32 ` aoliva at redhat dot com
2005-04-15 3:10 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: aoliva at redhat dot com @ 2005-04-15 2:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aoliva at gcc dot gnu dot org 2005-04-15 02:32 -------
Subject: Re: [PR middle-end/20739] lvalue cond-expr gimplification may crash on cv-qual diffs
On Apr 14, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:
> Bootstrap and regtest pased on amd64-linux-gnu, at least for mainline.
> I'm retesting on the branch, since I'm not entirely sure I actually
> tested it there.
Bootstrap and test completed on amd64-linux-gnu.
> Index: gcc/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
> PR middle-end/20739
> * gimplify.c (gimplify_addr_expr): Compensate for removal of
> e.g. cv-qualification conversions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0/4.1 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (12 preceding siblings ...)
2005-04-15 2:32 ` aoliva at redhat dot com
@ 2005-04-15 3:10 ` cvs-commit at gcc dot gnu dot org
2005-04-15 18:26 ` [Bug middle-end/20739] [4.0 " law at redhat dot com
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-15 3:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-15 03:09 -------
Subject: Bug 20739
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: aoliva@gcc.gnu.org 2005-04-15 03:09:51
Modified files:
gcc : ChangeLog gimplify.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/tree-ssa: pr20739.c
Log message:
gcc/ChangeLog:
PR middle-end/20739
* gimplify.c (gimplify_addr_expr): Compensate for removal of
e.g. cv-qualification conversions.
gcc/testsuite/ChangeLog:
PR middle-end/20739
* gcc.dg/tree-ssa/pr20739.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8299&r2=2.8300
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.122&r2=2.123
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5352&r2=1.5353
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr20739.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (13 preceding siblings ...)
2005-04-15 3:10 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-15 18:26 ` law at redhat dot com
2005-04-16 21:58 ` aoliva at redhat dot com
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: law at redhat dot com @ 2005-04-15 18:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From law at redhat dot com 2005-04-15 18:25 -------
Subject: Re: [PR middle-end/20739] lvalue cond-expr gimplification may
crash on cv-qual diffs
On Thu, 2005-04-14 at 14:02 -0300, Alexandre Oliva wrote:
> On Apr 4, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:
>
> > If the operands of a cond-expr used as an lvalue differ in cv
> > qualification, the front-end adds nop_exprs to add cv qualifiers that
> > the gimplifier drops when simplifying &(T const)*v. The `&' was added
> > by gimplify_cond_expr.
>
> > The problem is that gimplify_addr_expr gimplifies its operand in such
> > a way that the nop_expr is dropped, and nothing puts it back in, so
> > when we test that, in the indirect_ref case in gimplify_addr_expr, the
> > types are compatible, the test fails because of the missing
> > cv-qualifier in the pointed-to type. This patch fixes this.
>
> > Ok to install if bootstrap and regtest on amd64-linux-gnu pass?
>
> Bootstrap and regtest pased on amd64-linux-gnu, at least for mainline.
> I'm retesting on the branch, since I'm not entirely sure I actually
> tested it there.
Approved for mainline. Mark has final call on the branch.
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (14 preceding siblings ...)
2005-04-15 18:26 ` [Bug middle-end/20739] [4.0 " law at redhat dot com
@ 2005-04-16 21:58 ` aoliva at redhat dot com
2005-04-17 2:37 ` mark at codesourcery dot com
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: aoliva at redhat dot com @ 2005-04-16 21:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aoliva at gcc dot gnu dot org 2005-04-16 21:58 -------
Subject: Re: [PR middle-end/20739] lvalue cond-expr gimplification may crash on cv-qual diffs
On Apr 15, 2005, Jeffrey A Law <law@redhat.com> wrote:
> On Thu, 2005-04-14 at 14:02 -0300, Alexandre Oliva wrote:
>> On Apr 4, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:
>>
>> > If the operands of a cond-expr used as an lvalue differ in cv
>> > qualification, the front-end adds nop_exprs to add cv qualifiers that
>> > the gimplifier drops when simplifying &(T const)*v. The `&' was added
>> > by gimplify_cond_expr.
>>
>> > The problem is that gimplify_addr_expr gimplifies its operand in such
>> > a way that the nop_expr is dropped, and nothing puts it back in, so
>> > when we test that, in the indirect_ref case in gimplify_addr_expr, the
>> > types are compatible, the test fails because of the missing
>> > cv-qualifier in the pointed-to type. This patch fixes this.
>>
>> > Ok to install if bootstrap and regtest on amd64-linux-gnu pass?
>>
>> Bootstrap and regtest pased on amd64-linux-gnu, at least for mainline.
>> I'm retesting on the branch, since I'm not entirely sure I actually
>> tested it there.
> Approved for mainline. Mark has final call on the branch.
Thanks, Roger had already approved it for mainline, but not yet for
the branch. Mark?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (15 preceding siblings ...)
2005-04-16 21:58 ` aoliva at redhat dot com
@ 2005-04-17 2:37 ` mark at codesourcery dot com
2005-04-17 3:54 ` cvs-commit at gcc dot gnu dot org
2005-04-17 3:58 ` aoliva at gcc dot gnu dot org
18 siblings, 0 replies; 20+ messages in thread
From: mark at codesourcery dot com @ 2005-04-17 2:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mark at codesourcery dot com 2005-04-17 02:36 -------
Subject: Re: [PR middle-end/20739] lvalue cond-expr gimplification may crash
on cv-qual diffs
Alexandre Oliva wrote:
> Thanks, Roger had already approved it for mainline, but not yet for
> the branch. Mark?
OK for 4.0.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (16 preceding siblings ...)
2005-04-17 2:37 ` mark at codesourcery dot com
@ 2005-04-17 3:54 ` cvs-commit at gcc dot gnu dot org
2005-04-17 3:58 ` aoliva at gcc dot gnu dot org
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-17 3:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-17 03:54 -------
Subject: Bug 20739
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: aoliva@gcc.gnu.org 2005-04-17 03:54:04
Modified files:
gcc : ChangeLog gimplify.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/tree-ssa: pr20739.c
Log message:
gcc/ChangeLog:
PR middle-end/20739
* gimplify.c (gimplify_addr_expr): Compensate for removal of
e.g. cv-qualification conversions.
gcc/testsuite/ChangeLog:
PR middle-end/20739
* gcc.dg/tree-ssa/pr20739.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.163&r2=2.7592.2.164
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.113.2.3&r2=2.113.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.126&r2=1.5084.2.127
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr20739.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/20739] [4.0 regression] ICE in gimplify_addr_expr
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
` (17 preceding siblings ...)
2005-04-17 3:54 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-17 3:58 ` aoliva at gcc dot gnu dot org
18 siblings, 0 replies; 20+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2005-04-17 3:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aoliva at gcc dot gnu dot org 2005-04-17 03:58 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20739
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2005-04-17 3:58 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-03 14:29 [Bug middle-end/20739] New: [4.0/4.1 regression] ICE in gimplify_addr_expr steven at gcc dot gnu dot org
2005-04-03 14:33 ` [Bug middle-end/20739] " steven at gcc dot gnu dot org
2005-04-03 14:49 ` steven at gcc dot gnu dot org
2005-04-03 15:32 ` steven at gcc dot gnu dot org
2005-04-03 16:53 ` pinskia at gcc dot gnu dot org
2005-04-03 17:12 ` pinskia at gcc dot gnu dot org
2005-04-04 9:18 ` steven at gcc dot gnu dot org
2005-04-04 10:17 ` aoliva at gcc dot gnu dot org
2005-04-04 13:09 ` steven at gcc dot gnu dot org
2005-04-07 9:06 ` pinskia at gcc dot gnu dot org
2005-04-12 17:58 ` mmitchel at gcc dot gnu dot org
2005-04-14 17:03 ` aoliva at redhat dot com
2005-04-14 17:19 ` roger at eyesopen dot com
2005-04-15 2:32 ` aoliva at redhat dot com
2005-04-15 3:10 ` cvs-commit at gcc dot gnu dot org
2005-04-15 18:26 ` [Bug middle-end/20739] [4.0 " law at redhat dot com
2005-04-16 21:58 ` aoliva at redhat dot com
2005-04-17 2:37 ` mark at codesourcery dot com
2005-04-17 3:54 ` cvs-commit at gcc dot gnu dot org
2005-04-17 3:58 ` aoliva 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).