public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/45005] gfortran.dg/allocate_with_typespec.f90 failed
Date: Tue, 20 Jul 2010 23:35:00 -0000	[thread overview]
Message-ID: <20100720233520.28747.qmail@sourceware.org> (raw)
In-Reply-To: <bug-45005-682@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from sgk at troutmask dot apl dot washington dot edu  2010-07-20 23:35 -------
Subject: Re:  gfortran.dg/allocate_with_typespec.f90 failed

On Tue, Jul 20, 2010 at 02:41:01PM -0000, burnus at gcc dot gnu dot org wrote:
> 
> gfortran.dg/allocate_with_typespec.f90  shows on x86-64-linux (-m64):
> 
> gfortran.dg/allocate_with_typespec.f90:25:0: internal compiler error:
> Segmentation fault
> 
> ==11535== Invalid read of size 8
> ==11535==    at 0x542506: gfc_delete_symtree (symbol.c:2390)
> ==11535==    by 0x543506: gfc_undo_symbols (symbol.c:2862)
> ==11535==    by 0x5127E4: decode_statement (parse.c:272)
> ==11535==    by 0x5143C4: next_statement (parse.c:727)
> ==11535==    by 0x517EAE: gfc_parse_file (parse.c:4307)
> ==11535==    by 0x54E447: gfc_be_parse_file (f95-lang.c:236)
> ==11535==    by 0x83E279: toplev_main (toplev.c:978)
> ==11535==    by 0x6569B7C: (below main) (in /lib64/libc-2.11.2.so)
> 

The attached patch restores the order of the old match_type_spec.
It uses gfc_match(" %n ", name) to retrieve the next symbol
from the file and uses strcmp to check against intrinsics
types.  Thus, for allocate_with_typespec.f90, when name=real_type
the comparison fails, and we fall through to the matching for
a derived type by match_derived_type_spec().  I did not
write match_derived_type_spec() and have no idea how it works.
The prolific valgrind output that I see I believe is related
to match_derived_type_spec().  I've also attached the
valgrind log.


------- Comment #4 from sgk at troutmask dot apl dot washington dot edu  2010-07-20 23:35 -------
Created an attachment (id=21272)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21272&action=view)


------- Comment #5 from sgk at troutmask dot apl dot washington dot edu  2010-07-20 23:35 -------
Created an attachment (id=21273)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21273&action=view)


-- 


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


  parent reply	other threads:[~2010-07-20 23:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 13:55 [Bug fortran/45005] New: " hjl dot tools at gmail dot com
2010-07-20 13:59 ` [Bug fortran/45005] " hjl dot tools at gmail dot com
2010-07-20 14:41 ` burnus at gcc dot gnu dot org
2010-07-20 23:35 ` sgk at troutmask dot apl dot washington dot edu [this message]
2010-07-21 22:51 ` kargl at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100720233520.28747.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).