[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #23 from janus at gcc dot gnu.org 2013-02-06 19:39:43 UTC --- Author: janus Date: Wed Feb 6 19:39:35 2013 New Revision: 195814 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195814 Log: 2013-02-06 Janus Weil

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #22 from janus at gcc dot gnu.org 2013-02-06 13:56:02 UTC --- (In reply to comment #21) > It seems to work just as well as the patch in comment #18 and is much simpler. > Also it could catch this sort of thing in other situations

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 janus at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED Assig

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #20 from janus at gcc dot gnu.org 2013-02-06 12:54:41 UTC --- (In reply to comment #19) > That generates the code: > D.1896 = x != 0B > ? (struct array1_integer(kind=4) *) _gfortran_internal_pack (x) >

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #19 from Tobias Burnus 2013-02-06 12:17:14 UTC --- (In reply to comment #18) > Here is an updated patch, which works for pointers and pointer components, Seems to work better than I expected. However, there is still an issue

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #18 from janus at gcc dot gnu.org 2013-02-06 11:44:46 UTC --- Here is an updated patch, which works for pointers and pointer components, uses GFC_STD_F2008 and does some minor refactoring: Index: gcc/fortran/trans-array.c

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #17 from Tobias Burnus 2013-02-06 11:16:38 UTC --- (In reply to comment #16) > For the allocatable case, no packing is done at all (I guess it's just not > needed there, since an allocatable array, contrary to a pointer, is alw

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-06 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #16 from janus at gcc dot gnu.org 2013-02-06 10:54:39 UTC --- (In reply to comment #15) > (In reply to comment #14) > > + if (fsym && fsym->attr.optional && sym && sym->attr.pointer) > > Shouldn't you use something like

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-05 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #15 from Tobias Burnus 2013-02-05 22:46:03 UTC --- (In reply to comment #14) > + if (fsym && fsym->attr.optional && sym && sym->attr.pointer) Shouldn't you use something like gfc_expr_attr(expr).pointer Otherwise, I

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-05 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #14 from janus at gcc dot gnu.org 2013-02-05 22:31:06 UTC --- Draft patch: Index: gcc/fortran/trans-array.c === --- gcc/fortran/trans-array.c(revision 195644)

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-05 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #13 from janus at gcc dot gnu.org 2013-02-05 22:26:55 UTC --- (In reply to comment #12) > program main > implicit none > > integer, pointer :: y(:) > > y => null() > call a4t2(y) > > contains > > subroutine

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-05 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #12 from janus at gcc dot gnu.org 2013-02-05 21:25:09 UTC --- Here is a further reduced test case, based on comment 1 and 3 (which are basically identical): program main implicit none integer, pointer :: y(:) y =

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-04 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Co

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-02-04 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Rainer Orth changed: What|Removed |Added CC||ro at gcc dot gnu.org --- Comment

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-25 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Dominique d'Humieres changed: What|Removed |Added CC||ubizjak at gmail dot com

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-18 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Hans-Peter Nilsson changed: What|Removed |Added CC||hp at gcc dot gnu.org ---

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-15 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #7 from Tobias Burnus 2013-01-15 14:47:31 UTC --- (In reply to comment #6) > Looks as if code of the form: > if (y.data) > D.1914 = _gfortran_internal_pack (&y); > else > D.1914 = NULL; > > is missing The b

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-15 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Tobias Burnus changed: What|Removed |Added Keywords||wrong-code --- Comment #6 from

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-15 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Tobias Burnus changed: What|Removed |Added CC||howarth at nitro dot

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-15 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Tobias Burnus changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- C

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-15 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Richard Biener changed: What|Removed |Added Priority|P3 |P4 Target Milestone|---

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-14 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #3 from Thomas Koenig 2013-01-14 23:03:04 UTC --- A reduced test case which shows the problem in the dump: ! { dg-do run } ! { dg-options "-fcoarray=single" } ! ! PR fortran/50981 ! PR fortran/54618 ! program main i

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-14 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

2013-01-14 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #1 from Thomas Koenig 2013-01-14 21:29:25 UTC --- For -O0, valgrind complains about ==15263== Conditional jump or move depends on uninitialised value(s) ==15263==at 0x4F26355: _gfortran_internal_pack (in_pack_generic.c:54