public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/68010] internal compiler error: in tree_to_shwi, at tree.h:3661
Date: Mon, 19 Oct 2015 17:43:00 -0000	[thread overview]
Message-ID: <bug-68010-4-UAI4CVVe6x@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-68010-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|5.2.1, 6.0                  |
      Known to fail|                            |5.2.1, 6.0

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Reduced testcase ICEs with all supported versions:

markus@x4 tmp % cat c.ii
template <class _Container>
auto begin(_Container __cont) -> decltype(__cont.begin());
template <class _Container>
auto end(_Container __cont) -> decltype(__cont.end());
class A {
public:
  int begin();
  int end();
};
namespace boost {}
namespace b = boost;
namespace boost {
template <typename, typename = int, typename = int, typename = int,
          typename = int>
struct B;
template <typename = int> struct C;
template <typename, typename, typename, typename, typename> struct B {};
template <typename> struct C {
  typedef C base_type;
  template <typename Iterator_, typename T1_, typename T2_, typename T3_,
            typename T4_>
  C(B<Iterator_, T1_, T2_, T3_, T4_>);
};
}
template <typename Skipper> class StructDecoder : boost::C<Skipper> {
public:
  StructDecoder() : StructDecoder::base_type(start_rule) {
    namespace bs = boost;
    using namespace bs;
  }
  b::B<Skipper> start_rule;
};
namespace qi = boost;
class D {
public:
  D(int, int);
};
struct F : qi::C<> {
  F(int, D func) : base_type(program), report_error(func) {}
  qi::B<int> program;
  StructDecoder<int> q_syslog_desc;
  D report_error;
};
int NFGParserparse_tokens;
void NFGParserparse() {
  A str;
  D error_report(begin(str), end(str));
  F(NFGParserparse_tokens, error_report);
}

markus@x4 tmp % g++ -c -g -std=c++11 c.ii
c.ii: In constructor ‘StructDecoder<Skipper>::StructDecoder() [with Skipper =
int]’:
c.ii:49:1: internal compiler error: in tree_to_shwi, at tree.c:7289
 }
 ^
0xf22ae2 tree_to_shwi(tree_node const*)
        ../../gcc/gcc/tree.c:7289
0x983033 add_data_member_location_attribute
        ../../gcc/gcc/dwarf2out.c:15480
0x98c748 gen_inheritance_die
        ../../gcc/gcc/dwarf2out.c:20345
0x98c748 gen_member_die
        ../../gcc/gcc/dwarf2out.c:20397
0x98c748 gen_struct_or_union_type_die
        ../../gcc/gcc/dwarf2out.c:20517
0x98c748 gen_tagged_type_die
        ../../gcc/gcc/dwarf2out.c:20718
0x98b1cd gen_type_die_with_usage
        ../../gcc/gcc/dwarf2out.c:20880
0x98c036 gen_type_die
        ../../gcc/gcc/dwarf2out.c:20935
0x9948fa modified_type_die
        ../../gcc/gcc/dwarf2out.c:10950
0x99404b force_type_die
        ../../gcc/gcc/dwarf2out.c:21265
0x99378d get_context_die
        ../../gcc/gcc/dwarf2out.c:21180
0x99378d force_decl_die
        ../../gcc/gcc/dwarf2out.c:21199
0x993894 get_context_die
        ../../gcc/gcc/dwarf2out.c:21183
0x993894 force_decl_die
        ../../gcc/gcc/dwarf2out.c:21199
0x98e2a7 dwarf2out_imported_module_or_decl_1
        ../../gcc/gcc/dwarf2out.c:21752
0x98e592 process_scope_var
        ../../gcc/gcc/dwarf2out.c:21053
0x98e807 decls_for_scope
        ../../gcc/gcc/dwarf2out.c:21081
0x9a4b9d gen_lexical_block_die
        ../../gcc/gcc/dwarf2out.c:19950
0x9a4b9d gen_block_die
        ../../gcc/gcc/dwarf2out.c:21025
0x98e892 decls_for_scope
        ../../gcc/gcc/dwarf2out.c:21095
>From gcc-bugs-return-499955-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 19 17:48:41 2015
Return-Path: <gcc-bugs-return-499955-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 53181 invoked by alias); 19 Oct 2015 17:48:41 -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 53151 invoked by uid 48); 19 Oct 2015 17:48:37 -0000
From: "gerhard.steinmetz.fortran@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/68019] New: ICE on rank mismatch of implied-shape array of user-defined type
Date: Mon, 19 Oct 2015 17:48:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.2.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gerhard.steinmetz.fortran@t-online.de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-68019-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-10/txt/msg01510.txt.bz2
Content-length: 1194

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

            Bug ID: 68019
           Summary: ICE on rank mismatch of implied-shape array of
                    user-defined type
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

With a rank mismatch of "arr" :

$ cat z1.f90
program p
   integer :: i
   type t
      integer :: n
   end type
   type(t), parameter :: vec(*) = [(t(i), i = 1, 4)]
   type(t), parameter :: arr(*) = reshape(vec, [2, 2])
end


$ gfortran -g -O0 -Wall -fcheck=all z1.f90
f951: internal compiler error: in add_init_expr_to_sym, at fortran/decl.c:1457

---

Whereas :

$ cat z2.f90
program p
   integer :: i
   integer, parameter :: vec(*) = [(i, i = 1, 4)]
   integer, parameter :: arr(*) = reshape(vec, [2, 2])
end


$ gfortran -g -O0 -Wall -fcheck=all z2.f90
z2.f90:4:31:

    integer, parameter :: arr(*) = reshape(vec, [2, 2])
                               1
Error: Incompatible ranks 1 and 2 in assignment at (1)


  parent reply	other threads:[~2015-10-19 17:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18 18:33 [Bug c++/68010] New: " ghoort1 at gmail dot com
2015-10-18 19:02 ` [Bug c++/68010] " ghoort1 at gmail dot com
2015-10-18 19:23 ` trippels at gcc dot gnu.org
2015-10-18 19:53 ` ghoort1 at gmail dot com
2015-10-18 20:18 ` [Bug debug/68010] " trippels at gcc dot gnu.org
2015-10-19 17:43 ` trippels at gcc dot gnu.org [this message]
2015-10-21 20:15 ` ghoort1 at gmail dot com
2015-10-22  7:48 ` trippels at gcc dot gnu.org
2021-08-13 21:46 ` [Bug debug/68010] ICE with -g and using namespace and namespace alias pinskia at gcc dot gnu.org
2024-03-25  5:25 ` [Bug debug/68010] [11/12/13/14 Regression] ICE with -g and using namespace and namespace alias inside a template class with dependent inheritance pinskia 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-68010-4-UAI4CVVe6x@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).