[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2014-02-08 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

--- Comment #6 from Mikael Morin mikael at gcc dot gnu.org ---
Author: mikael
Date: Sat Feb  8 20:37:55 2014
New Revision: 207634

URL: http://gcc.gnu.org/viewcvs?rev=207634root=gccview=rev
Log:
fortran/
PR fortran/57033
* primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
dereference.

testsuite/
PR fortran/57033
* gfortran.dg/default_initialization_7.f90: New test.


Added:
   
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/default_initialization_7.f90
Modified:
branches/gcc-4_8-branch/gcc/fortran/ChangeLog
branches/gcc-4_8-branch/gcc/fortran/primary.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2014-02-08 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

--- Comment #7 from Mikael Morin mikael at gcc dot gnu.org ---
Author: mikael
Date: Sat Feb  8 20:51:01 2014
New Revision: 207635

URL: http://gcc.gnu.org/viewcvs?rev=207635root=gccview=rev
Log:
fortran/
   PR fortran/57033
   * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
   dereference.

testsuite/
PR fortran/57033
* gfortran.dg/default_initialization_7.f90: New test.


Added:
   
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/default_initialization_7.f90
Modified:
branches/gcc-4_7-branch/gcc/fortran/ChangeLog
branches/gcc-4_7-branch/gcc/fortran/primary.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2014-02-08 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

Mikael Morin mikael at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Mikael Morin mikael at gcc dot gnu.org ---
Fixed for 4.7.4, 4.8.3 and 4.9.0.
Thanks for the report.


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2014-02-04 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

Mikael Morin mikael at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mikael at gcc dot 
gnu.org


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2014-02-02 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

--- Comment #5 from Mikael Morin mikael at gcc dot gnu.org ---
Author: mikael
Date: Sun Feb  2 11:50:28 2014
New Revision: 207396

URL: http://gcc.gnu.org/viewcvs?rev=207396root=gccview=rev
Log:
fortran/
PR fortran/57033
* primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
dereference.

testsuite/
PR fortran/57033
* gfortran.dg/default_initialization_7.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/default_initialization_7.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/primary.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2014-01-26 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

Mikael Morin mikael at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mikael at gcc dot gnu.org

--- Comment #4 from Mikael Morin mikael at gcc dot gnu.org ---
Simple fix:

--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2544,7 +2544,8 @@ gfc_convert_to_structure_constructor (gfc_expr *e,
gfc_symbol *sym, gfc_expr **c
   if (parent  !comp)
 break;

-  actual = actual-next;
+  if (actual)
+actual = actual-next;
 }

   if (!build_actual_constructor (comp_head, ctor_head, sym))


I was about to commit it, then I thought there was something wrong;
Is the following code valid?  It is currently rejected with:

comment_0_modif.f90:14.6:

meo = me(1, 2)  ! ICE
  1
Error: No initializer for component 'j' given in the structure constructor at
(1)!




program ice

type m
integer i
logical :: f = .false.
end type m

type, extends(m) :: me
integer :: j
end type me

type(me) meo

meo = me(1, 2)  ! ICE
end program ice



[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2014-01-06 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

--- Comment #3 from Dominique d'Humieres dominiq at lps dot ens.fr ---
(In reply to comment #2)
  This is due to revision 181425.

 Which was the patch for the DT constructor, cf. PR39427, PR37829,
 http://gcc.gnu.org/r181425.

This revision also gives pr56674 and pr57129.


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2013-10-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2013-04-22 Thread dominiq at lps dot ens.fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033



Dominique d'Humieres dominiq at lps dot ens.fr changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-04-22

 CC||burnus at gcc dot gnu.org

Summary|ICE on extended derived |[4.7/4.8/4.9 Regression]

   |type and default|ICE on extended derived

   |initialization  |type and default

   ||initialization

 Ever Confirmed|0   |1



--- Comment #1 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-04-22 
16:13:20 UTC ---

This is due to revision 181425.


[Bug fortran/57033] [4.7/4.8/4.9 Regression] ICE on extended derived type and default initialization

2013-04-22 Thread burnus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57033



Tobias Burnus burnus at gcc dot gnu.org changed:



   What|Removed |Added



   Keywords||ice-on-valid-code

   Target Milestone|--- |4.7.4



--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2013-04-22 
16:31:07 UTC ---

(In reply to comment #1)

 This is due to revision 181425.



Which was the patch for the DT constructor, cf. PR39427, PR37829,

http://gcc.gnu.org/r181425.