public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38184] New: invariant RESHAPE not expanded if SOURCE is empty
@ 2008-11-19 20:55 mikael at gcc dot gnu dot org
2008-11-19 20:59 ` [Bug fortran/38184] " mikael at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-11-19 20:55 UTC (permalink / raw)
To: gcc-bugs
This is a clone of PR38135.
Reduced (a bit) testcase:
integer, parameter :: N = 3
integer A(N,N)
A(1:N,1:N)=reshape([integer::],[N,N],[1,2,2,2])
write(*,'(3i5)') A
end
--
Summary: invariant RESHAPE not expanded if SOURCE is empty
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mikael at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38184
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38184] invariant RESHAPE not expanded if SOURCE is empty
2008-11-19 20:55 [Bug fortran/38184] New: invariant RESHAPE not expanded if SOURCE is empty mikael at gcc dot gnu dot org
@ 2008-11-19 20:59 ` mikael at gcc dot gnu dot org
2008-11-20 23:02 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-11-19 20:59 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
------- Comment #1 from mikael at gcc dot gnu dot org 2008-11-19 20:57 -------
(In reply to comment #0)
> This is a clone of PR38135.
Path posted there:
Index: simplify.c
===================================================================
--- simplify.c (révision 141833)
+++ simplify.c (copie de travail)
@@ -3410,9 +3410,6 @@ is_constant_array_expr (gfc_expr *e)
if (e->expr_type != EXPR_ARRAY || !gfc_is_constant_expr (e))
return false;
- if (e->value.constructor == NULL)
- return false;
-
for (c = e->value.constructor; c; c = c->next)
if (c->expr->expr_type != EXPR_CONSTANT)
return false;
--
mikael at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mikael at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-11-19 20:57:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38184
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38184] invariant RESHAPE not expanded if SOURCE is empty
2008-11-19 20:55 [Bug fortran/38184] New: invariant RESHAPE not expanded if SOURCE is empty mikael at gcc dot gnu dot org
2008-11-19 20:59 ` [Bug fortran/38184] " mikael at gcc dot gnu dot org
@ 2008-11-20 23:02 ` burnus at gcc dot gnu dot org
2008-11-23 21:29 ` mikael at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-20 23:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2008-11-20 23:00 -------
Another test case is the following program (fixed by your patch):
http://groups.google.com/group/comp.lang.fortran/msg/2119be02dcf93517
How about packaging your patch and submitting it?
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38184
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38184] invariant RESHAPE not expanded if SOURCE is empty
2008-11-19 20:55 [Bug fortran/38184] New: invariant RESHAPE not expanded if SOURCE is empty mikael at gcc dot gnu dot org
2008-11-19 20:59 ` [Bug fortran/38184] " mikael at gcc dot gnu dot org
2008-11-20 23:02 ` burnus at gcc dot gnu dot org
@ 2008-11-23 21:29 ` mikael at gcc dot gnu dot org
2008-11-24 19:07 ` mikael at gcc dot gnu dot org
2008-11-24 22:01 ` mikael at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-11-23 21:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mikael at gcc dot gnu dot org 2008-11-23 21:27 -------
(In reply to comment #2)
> How about packaging your patch and submitting it?
>
It seems you missed it.
http://gcc.gnu.org/ml/fortran/2008-11/msg00249.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38184
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38184] invariant RESHAPE not expanded if SOURCE is empty
2008-11-19 20:55 [Bug fortran/38184] New: invariant RESHAPE not expanded if SOURCE is empty mikael at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-11-23 21:29 ` mikael at gcc dot gnu dot org
@ 2008-11-24 19:07 ` mikael at gcc dot gnu dot org
2008-11-24 22:01 ` mikael at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-11-24 19:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mikael at gcc dot gnu dot org 2008-11-24 19:06 -------
Subject: Bug 38184
Author: mikael
Date: Mon Nov 24 19:04:34 2008
New Revision: 142168
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142168
Log:
2008-11-24 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38184
* simplify.c (is_constant_array_expr): Return true instead of false
if the array constructor is empty.
2008-11-24 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38184
* gfortran.dg/reshape_empty_1.f03: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/reshape_empty_1.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38184
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/38184] invariant RESHAPE not expanded if SOURCE is empty
2008-11-19 20:55 [Bug fortran/38184] New: invariant RESHAPE not expanded if SOURCE is empty mikael at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-11-24 19:07 ` mikael at gcc dot gnu dot org
@ 2008-11-24 22:01 ` mikael at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-11-24 22:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mikael at gcc dot gnu dot org 2008-11-24 22:00 -------
Fixed on trunk, closing.
--
mikael at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38184
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-11-24 22:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-19 20:55 [Bug fortran/38184] New: invariant RESHAPE not expanded if SOURCE is empty mikael at gcc dot gnu dot org
2008-11-19 20:59 ` [Bug fortran/38184] " mikael at gcc dot gnu dot org
2008-11-20 23:02 ` burnus at gcc dot gnu dot org
2008-11-23 21:29 ` mikael at gcc dot gnu dot org
2008-11-24 19:07 ` mikael at gcc dot gnu dot org
2008-11-24 22:01 ` mikael 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).