https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
vehre at gcc dot gnu.org changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #18 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Tue Jul 7 11:10:12 2015
New Revision: 225507
URL: https://gcc.gnu.org/viewcvs?rev=225507root=gccview=rev
Log:
gcc/testsuite/ChangeLog:
2015-07-07 Andre Vehreschild
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
vehre at gcc dot gnu.org changed:
What|Removed |Added
Attachment #35806|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #16 from vehre at gcc dot gnu.org ---
I am getting a regression in char_length_5.f90. Anyone else?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #15 from Thomas Koenig tkoenig at gcc dot gnu.org ---
Is this something which could also have caused wrong-code issues in
other circumstances, which we just didn't happen to find until
this was exposed by Andre's patch and the test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #13 from Mikael Morin mikael at gcc dot gnu.org ---
Created attachment 35823
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35823action=edit
next attempt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #14 from Thomas Koenig tkoenig at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #13)
Created attachment 35823 [details]
next attempt
Looks very good (fixes the test case and the variants I have here).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #9 from Thomas Koenig tkoenig at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #8)
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index fece3ab..0b96de1 100644
--- a/gcc/fortran/trans-array.c
+++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #12 from vehre at gcc dot gnu.org ---
Created attachment 35806
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35806action=edit
Incomplete patch
The attached patch addresses some of the issues, but unfortunately does it open
some
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #10 from Mikael Morin mikael at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #9)
Unfortunately, this does not appear to fix the bug (at least not completely).
I still get an invalid free.
Indeed, unfortunately this:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #11 from Mikael Morin mikael at gcc dot gnu.org ---
In gfc_conv_expr_descriptor, the bounds used to initialize the descriptor are
different from the ones passed to gfc_get_array_type_bounds. That is the heart
of the problem, I think.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #4 from vehre at gcc dot gnu.org ---
Further analysis showed that while the offset of source's temporary descriptor
parm.3 is not as expected:
// allocate(c, source=a(:))
// lb, ub,, offset, data
parm.3 = {1, ub(a)+1,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #5 from Thomas Koenig tkoenig at gcc dot gnu.org ---
What I currently do not understand is why
allocate(c,source=a(:))
fails and
c = a(:)
works.
And yes, the scalarizer is pretty incomprehensible.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
Mikael Morin mikael at gcc dot gnu.org changed:
What|Removed |Added
CC||mikael at gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #6 from vehre at gcc dot gnu.org ---
c= a(:) works because there is no additional array descriptor inbetween.
The (new) allocate gets its own temporary array descriptor for the source=
expression, which in turn has incorrect bounds
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #8 from Mikael Morin mikael at gcc dot gnu.org ---
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index fece3ab..0b96de1 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -7079,7 +7077,7 @@
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
vehre at gcc dot gnu.org changed:
What|Removed |Added
Status|NEW |ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
--- Comment #3 from vehre at gcc dot gnu.org ---
Strictly speaking has this not much to do with the renewed allocate(). The
pseudo code shows that with and without the block construct the offset of the
source array's temporary descriptor is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
Thomas Koenig tkoenig at gcc dot gnu.org changed:
What|Removed |Added
Keywords||wrong-code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66578
Dominique d'Humieres dominiq at lps dot ens.fr changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
20 matches
Mail list logo