public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related)
Date: Sun, 26 Feb 2012 11:40:00 -0000	[thread overview]
Message-ID: <bug-52386-4-fVhufjqtbw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52386-4@http.gcc.gnu.org/bugzilla/>

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |pault at gcc dot gnu.org
   Target Milestone|---                         |4.6.3
            Summary|ICE in                      |[4.6/4.7 Regression] ICE in
                   |gfc_conv_descriptor_dtyp    |gfc_conv_descriptor_dtyp
                   |                            |(realloc LHS related)

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-26 11:17:39 UTC ---
Work around:  -fno-realloc-lhs.


I tried the following as one has a NOP expr, but I think one needs more. After
removing the nop, one still has:

(gdb) p debug_tree (desc)
 <parm_decl 0x2aaaacbed5d8 __result
    type <reference_type 0x2aaaacd10348
        type <record_type 0x2aaaacd0dc78 array1_integer(kind=4) type_1 BLK
            size <integer_cst 0x2aaaacd06180 constant 384>
            unit size <integer_cst 0x2aaaacce7c00 constant 48>
            align 64 symtab 0 alias set -1 canonical type 0x2aaaacd0dd20 fields
<field_decl 0x2aaaacd05390 data>
            pointer_to_this <pointer_type 0x2aaaacd10150> reference_to_this
<reference_type 0x2aaaacd10348> chain <type_decl 0x2aaaacc10a10 D.1859>>
        unsigned DI
        size <integer_cst 0x2aaaacbe5ec0 constant 64>
        unit size <integer_cst 0x2aaaacbe5ee0 constant 8>
        align 64 symtab 0 alias set -1 canonical type 0x2aaaacd103f0>
    readonly used unsigned DI file hj4faf.f90 line 5 col 0 size <integer_cst
0x2aaaacbe5ec0 64> unit size <integer_cst 0x2aaaacbe5ee0 8>
    align 64 context <function_decl 0x2aaaacd0e300 reduced> arg-type
<reference_type 0x2aaaacd10348> chain <parm_decl 0x2aaaacbed660 array>>


--- trans-expr.c        (Revision 184582)
+++ trans-expr.c
@@ -6299,6 +6301,7 @@ fcncall_realloc_result (gfc_se *se, int rank)
   /* Use the allocation done by the library.  Substitute the lhs
      descriptor with a copy, whose data field is nulled.*/
   desc = build_fold_indirect_ref_loc (input_location, se->expr);
+  STRIP_NOPS (desc);

   /* Unallocated, the descriptor does not have a dtype.  */
   tmp = gfc_conv_descriptor_dtype (desc);


  reply	other threads:[~2012-02-26 11:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26  8:35 [Bug fortran/52386] New: ICE in gfc_conv_descriptor_dtyp reuter at physik dot uni-freiburg.de
2012-02-26 11:40 ` burnus at gcc dot gnu.org [this message]
2012-02-27 10:47 ` [Bug fortran/52386] [4.6/4.7 Regression] ICE in gfc_conv_descriptor_dtyp (realloc LHS related) rguenth at gcc dot gnu.org
2012-02-29  7:40 ` pault at gcc dot gnu.org
2012-02-29 21:26 ` pault at gcc dot gnu.org
2012-02-29 21:44 ` pault at gcc dot gnu.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=bug-52386-4-fVhufjqtbw@http.gcc.gnu.org/bugzilla/ \
    --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).