public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference
@ 2004-08-13 13:37 reichelt at gcc dot gnu dot org
2004-08-13 13:39 ` [Bug tree-optimization/17016] " reichelt at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-13 13:37 UTC (permalink / raw)
To: gcc-bugs
Compiling the following valid code snippet with "g++ -O" on the lno-branch
I get an ICE.
=================================
struct A
{
int i[2];
};
void foo(A& a)
{
for (int j=0; j<2; ++j)
a.i[j]=0;
}
=================================
bug.cc: In function `void foo(A&)':
bug.cc:7: internal compiler error: tree check: expected integer_type or
enumeral_type or boolean_type or char_type or real_type, have reference_type in
number_of_iterations_cond, at tree-ssa-loop-niter.c:161
Please submit a full bug report, [etc.]
The ICE goes away if I pass the struct via a pointer.
--
Summary: [lno] ICE with struct passed as reference
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: critical
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
@ 2004-08-13 13:39 ` reichelt at gcc dot gnu dot org
2004-08-13 14:10 ` reichelt at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-13 13:39 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |lno
Known to work| |3.4.1 3.5.0
Version|3.5.0 |lno
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
2004-08-13 13:39 ` [Bug tree-optimization/17016] " reichelt at gcc dot gnu dot org
@ 2004-08-13 14:10 ` reichelt at gcc dot gnu dot org
2004-08-13 14:17 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-13 14:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-08-13 14:10 -------
Zdenek, your patch
http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg01147.html
seems to be responsible for the regression.
Could you please have a look?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
2004-08-13 13:39 ` [Bug tree-optimization/17016] " reichelt at gcc dot gnu dot org
2004-08-13 14:10 ` reichelt at gcc dot gnu dot org
@ 2004-08-13 14:17 ` pinskia at gcc dot gnu dot org
2004-08-15 5:34 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-13 14:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |lno
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-08-13 14:17 ` pinskia at gcc dot gnu dot org
@ 2004-08-15 5:34 ` pinskia at gcc dot gnu dot org
2004-08-23 7:40 ` cvs-commit at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-15 5:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-15 05:34 -------
Confirmed.
Basically:
if (TREE_CODE (type) == POINTER_TYPE)
in tree-ssa-ninter.c should be POINTER_TYPE_P (type) instead.
If this is correct fix, it should also go on the mainline also since this file is also on the mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-08-15 05:34:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-08-15 5:34 ` pinskia at gcc dot gnu dot org
@ 2004-08-23 7:40 ` cvs-commit at gcc dot gnu dot org
2004-08-23 7:43 ` rakdver at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-23 7:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-23 07:40 -------
Subject: Bug 17016
CVSROOT: /cvs/gcc
Module name: gcc
Branch: lno-branch
Changes by: rakdver@gcc.gnu.org 2004-08-23 07:40:18
Modified files:
gcc : ChangeLog.lno tree-ssa-loop-niter.c
Log message:
PR tree-optimization/17016
* tree-ssa-loop-niter.c (number_of_iterations_cond,
number_of_iterations_exit): Use POINTER_TYPE_P instead
of testing for POINTER_TYPE.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.lno.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.1.2.255&r2=1.1.2.256
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-niter.c.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.1.2.11&r2=1.1.2.12
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-08-23 7:40 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-23 7:43 ` rakdver at gcc dot gnu dot org
2004-08-23 7:49 ` reichelt at igpm dot rwth-aachen dot de
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-08-23 7:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-08-23 07:43 -------
Patch:
http://gcc.gnu.org/ml/gcc-patches/2004-08/msg01729.html
Fixed on lno, the bug is also latently present in mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Known to fail|lno |
Known to work|3.4.1 3.5.0 |3.4.1 3.5.0 lno
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-08-23 7:43 ` rakdver at gcc dot gnu dot org
@ 2004-08-23 7:49 ` reichelt at igpm dot rwth-aachen dot de
2004-08-23 7:53 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at igpm dot rwth-aachen dot de @ 2004-08-23 7:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at igpm dot rwth-aachen dot de 2004-08-23 07:49 -------
Subject: Re: [lno] ICE with struct passed as
reference
On 23 Aug, rakdver at gcc dot gnu dot org wrote:
>
> ------- Additional Comments From rakdver at gcc dot gnu dot org 2004-08-23 07:43 -------
> Patch:
>
> http://gcc.gnu.org/ml/gcc-patches/2004-08/msg01729.html
>
> Fixed on lno, the bug is also latently present in mainline.
Zdenek, your patch looks somewhat suspicious to me:
First you replace
! if (TREE_CODE (type) == POINTER_TYPE)
by
! if (POINTER_TYPE_P (type))
and then you replace
! && TREE_CODE (type) != POINTER_TYPE)
by
! && POINTER_TYPE_P (type))
Isn't there a "!" missing?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-08-23 7:49 ` reichelt at igpm dot rwth-aachen dot de
@ 2004-08-23 7:53 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-08-23 8:19 ` reichelt at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rakdver at atrey dot karlin dot mff dot cuni dot cz @ 2004-08-23 7:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2004-08-23 07:53 -------
Subject: Re: [lno] ICE with struct passed as reference
> ------- Additional Comments From reichelt at igpm dot rwth-aachen dot de 2004-08-23 07:49 -------
> Subject: Re: [lno] ICE with struct passed as
> reference
>
> On 23 Aug, rakdver at gcc dot gnu dot org wrote:
> >
> > ------- Additional Comments From rakdver at gcc dot gnu dot org 2004-08-23 07:43 -------
> > Patch:
> >
> > http://gcc.gnu.org/ml/gcc-patches/2004-08/msg01729.html
> >
> > Fixed on lno, the bug is also latently present in mainline.
>
> Zdenek, your patch looks somewhat suspicious to me:
>
> First you replace
> ! if (TREE_CODE (type) == POINTER_TYPE)
> by
> ! if (POINTER_TYPE_P (type))
>
> and then you replace
> ! && TREE_CODE (type) != POINTER_TYPE)
> by
> ! && POINTER_TYPE_P (type))
>
> Isn't there a "!" missing?
sure. Grr....
Zdenek
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] [lno] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-08-23 7:53 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
@ 2004-08-23 8:19 ` reichelt at gcc dot gnu dot org
2004-08-23 8:24 ` [Bug tree-optimization/17016] " reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-23 8:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-08-23 08:19 -------
Just for the record (so that it's not missed for mainline):
The patch was fixed by
http://gcc.gnu.org/ml/gcc-cvs/2004-08/msg01164.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-08-23 8:19 ` reichelt at gcc dot gnu dot org
@ 2004-08-23 8:24 ` reichelt at gcc dot gnu dot org
2004-08-23 10:36 ` rakdver at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-08-23 8:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-08-23 08:24 -------
Changing the target milestone since this is latent on mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to work|3.4.1 3.5.0 lno |3.4.1 lno
Summary|[lno] ICE with struct passed|ICE with struct passed as
|as reference |reference
Target Milestone|lno |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-08-23 8:24 ` [Bug tree-optimization/17016] " reichelt at gcc dot gnu dot org
@ 2004-08-23 10:36 ` rakdver at gcc dot gnu dot org
2004-08-24 20:50 ` cvs-commit at gcc dot gnu dot org
2004-08-24 20:55 ` rakdver at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-08-23 10:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-08-23 10:36 -------
*** Bug 17146 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |stefaandr at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-08-23 10:36 ` rakdver at gcc dot gnu dot org
@ 2004-08-24 20:50 ` cvs-commit at gcc dot gnu dot org
2004-08-24 20:55 ` rakdver at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-24 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-24 20:50 -------
Subject: Bug 17016
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rakdver@gcc.gnu.org 2004-08-24 20:50:43
Modified files:
gcc : ChangeLog tree-ssa-loop-niter.c
Log message:
PR tree-optimization/17016
* tree-ssa-loop-niter.c (number_of_iterations_cond,
number_of_iterations_exit): Use POINTER_TYPE_P instead
of testing for POINTER_TYPE.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5070&r2=2.5071
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-niter.c.diff?cvsroot=gcc&r1=2.3&r2=2.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/17016] ICE with struct passed as reference
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-08-24 20:50 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-24 20:55 ` rakdver at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2004-08-24 20:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-08-24 20:55 -------
Fixed also in mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2004-08-24 20:55 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-13 13:37 [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference reichelt at gcc dot gnu dot org
2004-08-13 13:39 ` [Bug tree-optimization/17016] " reichelt at gcc dot gnu dot org
2004-08-13 14:10 ` reichelt at gcc dot gnu dot org
2004-08-13 14:17 ` pinskia at gcc dot gnu dot org
2004-08-15 5:34 ` pinskia at gcc dot gnu dot org
2004-08-23 7:40 ` cvs-commit at gcc dot gnu dot org
2004-08-23 7:43 ` rakdver at gcc dot gnu dot org
2004-08-23 7:49 ` reichelt at igpm dot rwth-aachen dot de
2004-08-23 7:53 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-08-23 8:19 ` reichelt at gcc dot gnu dot org
2004-08-23 8:24 ` [Bug tree-optimization/17016] " reichelt at gcc dot gnu dot org
2004-08-23 10:36 ` rakdver at gcc dot gnu dot org
2004-08-24 20:50 ` cvs-commit at gcc dot gnu dot org
2004-08-24 20:55 ` rakdver 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).