public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64947] New: Internal compiler error: in gimplify_expr, at gimplify.c:8425
@ 2015-02-05 14:26 bugs at stellardeath dot org
  2015-02-05 14:31 ` [Bug fortran/64947] " bugs at stellardeath dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugs at stellardeath dot org @ 2015-02-05 14:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64947

            Bug ID: 64947
           Summary: Internal compiler error: in gimplify_expr, at
                    gimplify.c:8425
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugs at stellardeath dot org

Created attachment 34676
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34676&action=edit
Fairly minimal testcase to trigger the bug.

The following (IMO valid) code produces an internal compiler error for gfortran
4.9.0 which is available on my openSUSE:

#> cat testcase.f90
module ice_gimplify_expr
  use, intrinsic :: iso_c_binding
  implicit none

  integer, parameter :: name_length = 40

  type :: node_t
    character(len=name_length) :: name
    contains
      procedure, pass :: get_child => node_get_child
  end type

  interface
    pure function strnlen(ptr, maxlen) result(size) bind(c, name="strnlen")
      use, intrinsic :: iso_c_binding
      type(c_ptr), intent(in), value :: ptr
      integer(kind=C_SIZE_T), intent(in), value :: maxlen
      integer(kind=C_SIZE_T) :: size
    end function
  end interface

  contains

  function node_get_child(self, name) result(child)
    class(node_t), intent(in) :: self
    character(len=*), intent(in) :: name
    type(node_t), pointer :: child
    child => NULL()
  end function

  function c_string(ptr) result(s)
    type(c_ptr), value, intent(in) :: ptr
    character(kind=C_CHAR, len=strnlen(ptr, int(name_length, kind=C_SIZE_T))),
pointer :: s
    call c_f_pointer(ptr, s)
  end function

  function node_from_strings(strings) result(node)
    type(node_t), pointer :: node
    type(c_ptr), intent(in), dimension(2) :: strings
    node => node%get_child(c_string(strings(1)))
  end function

end module
#> gfortran-4.9 --version
GNU Fortran (SUSE Linux) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

#> gfortran-4.9 -ffree-form -c testcase.f90
testcase.f90: In function ‘node_from_strings’:
testcase.f90:40:0: internal compiler error: in gimplify_expr, at
gimplify.c:8425
     node => node%get_child(c_string(strings(1)))
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.
#>
>From gcc-bugs-return-476129-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 05 14:27:59 2015
Return-Path: <gcc-bugs-return-476129-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15459 invoked by alias); 5 Feb 2015 14:27:59 -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 15322 invoked by uid 48); 5 Feb 2015 14:27:56 -0000
From: "gene at staubsaal dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64915] lambda partially drops constness of 'this'
Date: Thu, 05 Feb 2015 14:27: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.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gene at staubsaal dot de
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-64915-4-DVd3J4vMDH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64915-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64915-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: 2015-02/txt/msg00462.txt.bz2
Content-length: 495

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd915

gene at staubsaal dot de changed:

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

--- Comment #1 from gene at staubsaal dot de ---
Duplicated, didn't find it on my last search.

*** This bug has been marked as a duplicate of bug 60463 ***


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

* [Bug fortran/64947] Internal compiler error: in gimplify_expr, at gimplify.c:8425
  2015-02-05 14:26 [Bug fortran/64947] New: Internal compiler error: in gimplify_expr, at gimplify.c:8425 bugs at stellardeath dot org
@ 2015-02-05 14:31 ` bugs at stellardeath dot org
  2015-02-05 15:23 ` burnus at gcc dot gnu.org
  2015-02-05 15:34 ` [Bug fortran/64947] ICE in gimplify_expr, at gimplify.c:8425 with arrays of type(C_PTR) burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: bugs at stellardeath dot org @ 2015-02-05 14:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64947

--- Comment #1 from Lorenz Hüdepohl <bugs at stellardeath dot org> ---
Also present in 4.8.3:

#> gfortran --version
GNU Fortran (SUSE Linux) 4.8.3 20141208 [gcc-4_8-branch revision 218481]
Copyright (C) 2013 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

#> gfortran -ffree-form -c testcase.f90
testcase.f90: In function ‘node_from_strings’:
testcase.f90:40:0: internal compiler error: in gimplify_expr, at
gimplify.c:8051
     node => node%get_child(c_string(strings(1)))
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.
>From gcc-bugs-return-476132-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 05 14:33:46 2015
Return-Path: <gcc-bugs-return-476132-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23986 invoked by alias); 5 Feb 2015 14:33:45 -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 23873 invoked by uid 48); 5 Feb 2015 14:33:39 -0000
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/64349] [5 Regression] Bootstrapping Ada fails on darwin(9|10).
Date: Thu, 05 Feb 2015 14:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ada
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: build
X-Bugzilla-Severity: normal
X-Bugzilla-Who: iains 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: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-64349-4-FDH76xpWCC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64349-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64349-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: 2015-02/txt/msg00465.txt.bz2
Content-length: 530

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd349

--- Comment #18 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #17)
> > Better now?
>
> Yes, I have bootstrapped a clean revision r220437 on x86_64-apple-darwin10,
> regtesting in progress.
>
> For the record, I still see the warning
>
> ld: warning: can't add line info to anonymous symbol __const@0 from
> s-arit64.o

presumably a separate issue
- I'm bootstrapping i686-darwin10 (but on a core duo, so not terribly quick).


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

* [Bug fortran/64947] Internal compiler error: in gimplify_expr, at gimplify.c:8425
  2015-02-05 14:26 [Bug fortran/64947] New: Internal compiler error: in gimplify_expr, at gimplify.c:8425 bugs at stellardeath dot org
  2015-02-05 14:31 ` [Bug fortran/64947] " bugs at stellardeath dot org
@ 2015-02-05 15:23 ` burnus at gcc dot gnu.org
  2015-02-05 15:34 ` [Bug fortran/64947] ICE in gimplify_expr, at gimplify.c:8425 with arrays of type(C_PTR) burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-02-05 15:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64947

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-05
                 CC|                            |burnus at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.3, 4.9.0, 5.0

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
If fails for:
8837          gcc_assert (!VOID_TYPE_P (TREE_TYPE (*expr_p)));

which is:
(gdb) p debug_tree(*expr_p)
 <mem_ref 0x7ffff20f8ca8
    type <void_type 0x7ffff1f4c000 void VOID
        align 8 symtab 0 alias set -1 canonical type 0x7ffff1f4c000
        pointer_to_this <pointer_type 0x7ffff1f4c150>>
    arg 0 <var_decl 0x7ffff1f3cc60 D.3415
        type <pointer_type 0x7ffff1f4c150 type <void_type 0x7ffff1f4c000 void>
[...]
    arg 1 <integer_cst 0x7ffff1f31fd8 type <pointer_type 0x7ffff1f4c150>
        constant 0> foo.f90:40:0>

The variable mentioned appears in the 
    void * D.3415;
    D.3415 = (*strings)[0];
    D.3417 = strnlen (*D.3415, 40);
    c_string (&pstr.1, MAX_EXPR <(integer(kind=4)) D.3417, 0>, D.3415);

And the problem is that the TREE_TYPE (*expr_p) _is_ a void pointer.


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

* [Bug fortran/64947] ICE in gimplify_expr, at gimplify.c:8425 with arrays of type(C_PTR)
  2015-02-05 14:26 [Bug fortran/64947] New: Internal compiler error: in gimplify_expr, at gimplify.c:8425 bugs at stellardeath dot org
  2015-02-05 14:31 ` [Bug fortran/64947] " bugs at stellardeath dot org
  2015-02-05 15:23 ` burnus at gcc dot gnu.org
@ 2015-02-05 15:34 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-02-05 15:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64947

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Internal compiler error: in |ICE in gimplify_expr, at
                   |gimplify_expr, at           |gimplify.c:8425 with arrays
                   |gimplify.c:8425             |of type(C_PTR)

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #2)
>     void * D.3415;
>     D.3415 = (*strings)[0];
>     D.3417 = strnlen (*D.3415, 40);

Namely, the "*D.3415" is the problem. What data type has a "void *" pointer if
it is dereferenced?

We really have to pass D.3415 to strlen - not the derefed temporary variable.


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

end of thread, other threads:[~2015-02-05 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 14:26 [Bug fortran/64947] New: Internal compiler error: in gimplify_expr, at gimplify.c:8425 bugs at stellardeath dot org
2015-02-05 14:31 ` [Bug fortran/64947] " bugs at stellardeath dot org
2015-02-05 15:23 ` burnus at gcc dot gnu.org
2015-02-05 15:34 ` [Bug fortran/64947] ICE in gimplify_expr, at gimplify.c:8425 with arrays of type(C_PTR) burnus 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).