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



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



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |NEW

   Last reconfirmed|                            |2013-03-09

                 CC|                            |janus at gcc dot gnu.org

            Summary|An invalid OO code causes   |[4.6/4.7/4.8 Regression] An

                   |ICE                         |invalid OO code causes ICE

     Ever Confirmed|0                           |1



--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-03-09 
11:48:56 UTC ---

Revision 170214 (2011-02-16) gives the errors and revision 170230 (2011-02-16) 

gives the segmentation fault. The only change in this range is revision 170223



Author: janus

Date: Wed Feb 16 20:51:56 2011

New Revision: 170223



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170223

Log:

2011-02-16  Janus Weil  <ja...@gcc.gnu.org>



    PR fortran/47745

    * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.

    * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into

    'gfc_build_class_symbol'.

    (gfc_match_decl_type_spec): Reject unlimited polymorphism.

    * interface.c (matching_typebound_op): Check for 'class_ok' attribute.

    * match.c (select_type_set_tmp): Move setting of 'class_ok' into

    'gfc_build_class_symbol'.

    * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.



2011-02-16  Janus Weil  <ja...@gcc.gnu.org>



    PR fortran/47745

    * gfortran.dg/class_39.f03: New.



Added:

    trunk/gcc/testsuite/gfortran.dg/class_39.f03

Modified:

    trunk/gcc/fortran/ChangeLog

    trunk/gcc/fortran/class.c

    trunk/gcc/fortran/decl.c

    trunk/gcc/fortran/interface.c

    trunk/gcc/fortran/match.c

    trunk/gcc/fortran/primary.c

    trunk/gcc/testsuite/ChangeLog



Backtrace:



(gdb) run pr56575.f90

Starting program:

/opt/gcc/gcc4.8w/libexec/gcc/x86_64-apple-darwin10.8.0/4.8.0/f951 pr56575.f90



Program received signal SIGSEGV, Segmentation fault.

0x0000000100037bee in gfc_default_initializer (ts=0x141a152f0) at

../../work/gcc/fortran/expr.c:3894

3894        || (comp->ts.type == BT_CLASS && CLASS_DATA

(comp)->attr.allocatable))

(gdb) bt

#0  0x0000000100037bee in gfc_default_initializer (ts=0x141a152f0) at

../../work/gcc/fortran/expr.c:3894

#1  0x000000010001c543 in gfc_find_derived_vtab (derived=0x141a14350) at

../../work/gcc/fortran/class.c:2303

#2  0x000000010001cb03 in gfc_build_class_symbol (ts=0x141a147c0,

attr=0x141a147e8, as=0x141a14838, delayed_vtab=<value optimized out>)

    at ../../work/gcc/fortran/class.c:648

#3  0x0000000100022c5c in build_sym (name=<value optimized out>, cl=<value

optimized out>, cl_deferred=<value optimized out>, 

    as=<value optimized out>, var_locus=<value optimized out>) at

../../work/gcc/fortran/decl.c:1197

#4  0x0000000100028c49 in gfc_match_data_decl () at

../../work/gcc/fortran/decl.c:1988

#5  0x000000010007a5da in match_word (subr=<value optimized out>,

old_locus=0x7fff5fbfd300, str=<value optimized out>)

    at ../../work/gcc/fortran/parse.c:65

#6  0x000000010007af77 in decode_statement () at

../../work/gcc/fortran/parse.c:330

#7  0x000000010007c70a in next_statement () at

../../work/gcc/fortran/parse.c:777

#8  0x000000010007e675 in parse_spec (st=ST_NONE) at

../../work/gcc/fortran/parse.c:2590

#9  0x0000000100080549 in parse_progunit (st=<value optimized out>) at

../../work/gcc/fortran/parse.c:4118

#10 0x0000000100080921 in parse_contained (module=1) at

../../work/gcc/fortran/parse.c:4057

#11 0x0000000100081e5a in gfc_parse_file () at

../../work/gcc/fortran/parse.c:4316

#12 0x00000001000c1d96 in gfc_be_parse_file () at

../../work/gcc/fortran/f95-lang.c:189

#13 0x000000010076dc84 in compile_file () at ../../work/gcc/toplev.c:543

#14 0x000000010076fda9 in toplev_main (argc=2, argv=0x7fff5fbfd7c8) at

../../work/gcc/toplev.c:1876

#15 0x000000010000a644 in start (pc=<value optimized out>, bases=0x0) at

../../../work/libgcc/config/unwind-dw2-fde-darwin.c:272

Reply via email to