public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/60378] New: ICE on attempt to print null of derived type with unlimited polymorphic component
@ 2014-03-01  8:51 vladimir.fuka at gmail dot com
  2014-03-01 14:07 ` [Bug fortran/60378] " janus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: vladimir.fuka at gmail dot com @ 2014-03-01  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60378
           Summary: ICE on attempt to print null of derived type with
                    unlimited polymorphic component
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vladimir.fuka at gmail dot com

type refptr
    class(*), allocatable :: data
  end type

  type(refptr),pointer :: x

  print *,null(mold=x)
end

gfortran null.f90 
null.f90: In function ‘MAIN__’:
null.f90:7:0: internal compiler error: Bad IO basetype (7)
   print *,null(mold=x)
 ^
0x5e456b transfer_expr
        ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:2185
0x5e4422 transfer_expr
        ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:2179
0x5e76e5 gfc_trans_transfer(gfc_code*)
        ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:2312
0x5a7177 trans_code
        ../../gcc-4.8-20131003/gcc/fortran/trans.c:1625
0x5e55d7 build_dt
        ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:1835
0x5a7197 trans_code
        ../../gcc-4.8-20131003/gcc/fortran/trans.c:1597
0x5c4812 gfc_generate_function_code(gfc_namespace*)
        ../../gcc-4.8-20131003/gcc/fortran/trans-decl.c:5397
0x568490 translate_all_program_units
        ../../gcc-4.8-20131003/gcc/fortran/parse.c:4474
0x568490 gfc_parse_file()
        ../../gcc-4.8-20131003/gcc/fortran/parse.c:4688
0x5a3845 gfc_be_parse_file
        ../../gcc-4.8-20131003/gcc/fortran/f95-lang.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-445144-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Mar 01 09:46:17 2014
Return-Path: <gcc-bugs-return-445144-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2752 invoked by alias); 1 Mar 2014 09:46:16 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 2698 invoked by uid 48); 1 Mar 2014 09:46:11 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56438] [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551
Date: Sat, 01 Mar 2014 09:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-56438-4-XTd7fDyeqQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56438-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56438-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-03/txt/msg00013.txt.bz2
Content-length: 595

http://gcc.gnu.org/bugzilla/show_bug.cgi?idV438

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
What about the following testcase:

template <int> struct A {
  void m_fn1(int p1) {
    int *a;
    while (p1 && *static_cast<int *>(static_cast<void *>(a)))
      ;
  }
};

shouldn't this compile?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/60378] ICE on attempt to print null of derived type with unlimited polymorphic component
  2014-03-01  8:51 [Bug fortran/60378] New: ICE on attempt to print null of derived type with unlimited polymorphic component vladimir.fuka at gmail dot com
@ 2014-03-01 14:07 ` janus at gcc dot gnu.org
  2014-03-01 17:09 ` kargl at gcc dot gnu.org
  2014-03-01 20:06 ` janus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2014-03-01 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org

--- Comment #1 from janus at gcc dot gnu.org ---
I can confirm the ICE with 4.8, but trunk gives:

  print *,null(mold=x)
          1
Error: Invalid context for NULL () intrinsic at (1)


which I guess is correct.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/60378] ICE on attempt to print null of derived type with unlimited polymorphic component
  2014-03-01  8:51 [Bug fortran/60378] New: ICE on attempt to print null of derived type with unlimited polymorphic component vladimir.fuka at gmail dot com
  2014-03-01 14:07 ` [Bug fortran/60378] " janus at gcc dot gnu.org
@ 2014-03-01 17:09 ` kargl at gcc dot gnu.org
  2014-03-01 20:06 ` janus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu.org @ 2014-03-01 17:09 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to janus from comment #1)
> I can confirm the ICE with 4.8, but trunk gives:
> 
>   print *,null(mold=x)
>           1
> Error: Invalid context for NULL () intrinsic at (1)
> 
> 
> which I guess is correct.

According to F2008 (above Note 9.33), "If an output item is
a pointer, it shall be associated with a target and data are
transferred from the target to the file."

Given that NULL() is used to disassociated a point, I would 
say that the error message is correct.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/60378] ICE on attempt to print null of derived type with unlimited polymorphic component
  2014-03-01  8:51 [Bug fortran/60378] New: ICE on attempt to print null of derived type with unlimited polymorphic component vladimir.fuka at gmail dot com
  2014-03-01 14:07 ` [Bug fortran/60378] " janus at gcc dot gnu.org
  2014-03-01 17:09 ` kargl at gcc dot gnu.org
@ 2014-03-01 20:06 ` janus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2014-03-01 20:06 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from janus at gcc dot gnu.org ---
Ok, so let's close this, since it's fixed on trunk.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-01 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-01  8:51 [Bug fortran/60378] New: ICE on attempt to print null of derived type with unlimited polymorphic component vladimir.fuka at gmail dot com
2014-03-01 14:07 ` [Bug fortran/60378] " janus at gcc dot gnu.org
2014-03-01 17:09 ` kargl at gcc dot gnu.org
2014-03-01 20:06 ` janus at gcc dot gnu.org

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).