public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45183] New: [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90
@ 2010-08-04 16:15 hjl dot tools at gmail dot com
2010-08-04 17:39 ` [Bug fortran/45183] " burnus at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-04 16:15 UTC (permalink / raw)
To: gcc-bugs
On Linux/ia32, revision 162863 gave
FAIL: gfortran.dg/derived_constructor_char_1.f90 -O (test for excess errors)
FAIL: gfortran.dg/derived_constructor_char_1.f90 -O scan-tree-dump-times
original "five = ..txt=..AbCdE., .ZyXwV...;" 1: dump file does not exist
FAIL: gfortran.dg/derived_constructor_char_1.f90 -O scan-tree-dump-times
original "four = ..txt=..ABC ., .ZYX ...;" 1: dump file does not exist
FAIL: gfortran.dg/derived_constructor_char_1.f90 -O scan-tree-dump-times
original "one = ..txt=..12345., .67890...;" 1: dump file does not exist
FAIL: gfortran.dg/derived_constructor_char_1.f90 -O scan-tree-dump-times
original "six = ..txt=..aBcDe., .zYxWv...;" 1: dump file does not exist
FAIL: gfortran.dg/derived_constructor_char_1.f90 -O scan-tree-dump-times
original "three = ..txt=..12345., .abcde...;" 1: dump file does not exist
FAIL: gfortran.dg/derived_constructor_char_1.f90 -O scan-tree-dump-times
original "two = ..txt=..123 ., .678 ...;" 1: dump file does not exist
Revision 162860 is OK
--
Summary: [4.6 Regression] FAIL:
gfortran.dg/derived_constructor_char_1.f90
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45183
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45183] [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90
2010-08-04 16:15 [Bug fortran/45183] New: [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90 hjl dot tools at gmail dot com
@ 2010-08-04 17:39 ` burnus at gcc dot gnu dot org
2010-08-04 18:09 ` kargl at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-04 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2010-08-04 17:39 -------
PATCH - lightly tested. Now regtesting.
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (Revision 162868)
+++ gcc/fortran/resolve.c (Arbeitskopie)
@@ -936,11 +936,26 @@ resolve_structure_cons (gfc_expr *expr)
p = gfc_constructor_first (cons->expr->value.constructor);
if (cons->expr->ts.u.cl != p->expr->ts.u.cl)
{
- gfc_free_expr (cons->expr->ts.u.cl->length);
- gfc_free (cons->expr->ts.u.cl);
+ gfc_charlen *cl, *cl2;
+
+ cl2 = NULL;
+ for (cl = gfc_current_ns->cl_list; cl; cl = cl->next)
+ {
+ if (cl == cons->expr->ts.u.cl)
+ break;
+ cl2 = cl;
+ }
+
+ gcc_assert (cl);
+
+ if (cl2)
+ cl2->next = cl->next;
+
+ gfc_free_expr (cl->length);
+ gfc_free (cl);
}
- cons->expr->ts.u.cl = gfc_get_charlen ();
+ cons->expr->ts.u.cl = gfc_new_charlen (gfc_current_ns, NULL);
cons->expr->ts.u.cl->length_from_typespec = true;
cons->expr->ts.u.cl->length = gfc_copy_expr
(comp->ts.u.cl->length);
gfc_resolve_character_array_constructor (cons->expr);
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-08-04 17:39:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45183
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45183] [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90
2010-08-04 16:15 [Bug fortran/45183] New: [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90 hjl dot tools at gmail dot com
2010-08-04 17:39 ` [Bug fortran/45183] " burnus at gcc dot gnu dot org
@ 2010-08-04 18:09 ` kargl at gcc dot gnu dot org
2010-08-04 18:13 ` kargl at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-08-04 18:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kargl at gcc dot gnu dot org 2010-08-04 18:09 -------
(In reply to comment #1)
> PATCH - lightly tested. Now regtesting.
>
> Index: gcc/fortran/resolve.c
> ===================================================================
> --- gcc/fortran/resolve.c (Revision 162868)
> +++ gcc/fortran/resolve.c (Arbeitskopie)
> @@ -936,11 +936,26 @@ resolve_structure_cons (gfc_expr *expr)
> p = gfc_constructor_first (cons->expr->value.constructor);
> if (cons->expr->ts.u.cl != p->expr->ts.u.cl)
> {
> - gfc_free_expr (cons->expr->ts.u.cl->length);
> - gfc_free (cons->expr->ts.u.cl);
> + gfc_charlen *cl, *cl2;
> +
> + cl2 = NULL;
> + for (cl = gfc_current_ns->cl_list; cl; cl = cl->next)
> + {
> + if (cl == cons->expr->ts.u.cl)
> + break;
> + cl2 = cl;
> + }
> +
> + gcc_assert (cl);
> +
> + if (cl2)
> + cl2->next = cl->next;
> +
> + gfc_free_expr (cl->length);
> + gfc_free (cl);
> }
>
> - cons->expr->ts.u.cl = gfc_get_charlen ();
> + cons->expr->ts.u.cl = gfc_new_charlen (gfc_current_ns, NULL);
> cons->expr->ts.u.cl->length_from_typespec = true;
> cons->expr->ts.u.cl->length = gfc_copy_expr
> (comp->ts.u.cl->length);
> gfc_resolve_character_array_constructor (cons->expr);
>
I must be missing something here. What does cl2 do in the above
patch? You set it, but it is never used.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45183
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45183] [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90
2010-08-04 16:15 [Bug fortran/45183] New: [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90 hjl dot tools at gmail dot com
2010-08-04 17:39 ` [Bug fortran/45183] " burnus at gcc dot gnu dot org
2010-08-04 18:09 ` kargl at gcc dot gnu dot org
@ 2010-08-04 18:13 ` kargl at gcc dot gnu dot org
2010-08-04 18:50 ` burnus at gcc dot gnu dot org
2010-08-04 18:50 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-08-04 18:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kargl at gcc dot gnu dot org 2010-08-04 18:13 -------
>
> I must be missing something here. What does cl2 do in the above
> patch? You set it, but it is never used.
>
Nevermind, I understand what the code does. I can't even claim
that I haven't had enough coffee this morning. :(
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45183
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45183] [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90
2010-08-04 16:15 [Bug fortran/45183] New: [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90 hjl dot tools at gmail dot com
` (2 preceding siblings ...)
2010-08-04 18:13 ` kargl at gcc dot gnu dot org
@ 2010-08-04 18:50 ` burnus at gcc dot gnu dot org
2010-08-04 18:50 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-04 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2010-08-04 18:49 -------
Subject: Bug 45183
Author: burnus
Date: Wed Aug 4 18:49:23 2010
New Revision: 162871
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162871
Log:
2010-08-04 Tobias Burnus <burnus@net-b.de>
PR fortran/45183
PR fortran/44857
* resolve.c (resolve_structure_cons): Fix
freeing of charlen.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45183
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/45183] [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90
2010-08-04 16:15 [Bug fortran/45183] New: [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90 hjl dot tools at gmail dot com
` (3 preceding siblings ...)
2010-08-04 18:50 ` burnus at gcc dot gnu dot org
@ 2010-08-04 18:50 ` burnus at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-04 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2010-08-04 18:50 -------
FIXED. Thanks for the timely report.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45183
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-04 18:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-04 16:15 [Bug fortran/45183] New: [4.6 Regression] FAIL: gfortran.dg/derived_constructor_char_1.f90 hjl dot tools at gmail dot com
2010-08-04 17:39 ` [Bug fortran/45183] " burnus at gcc dot gnu dot org
2010-08-04 18:09 ` kargl at gcc dot gnu dot org
2010-08-04 18:13 ` kargl at gcc dot gnu dot org
2010-08-04 18:50 ` burnus at gcc dot gnu dot org
2010-08-04 18:50 ` burnus 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).