public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59032] New: [4.8/4.9 Regression] ICE incrementing vector type
Date: Wed, 06 Nov 2013 20:38:00 -0000	[thread overview]
Message-ID: <bug-59032-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 59032
           Summary: [4.8/4.9 Regression] ICE incrementing vector type
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet triggers an ICE since GCC 4.8.0:

============================================
void foo()
{
  float v __attribute__((vector_size(8)));
  ++v;
}
============================================

bug.cc: In function 'void foo()':
bug.cc:4:5: error: can't convert between vector values of different size
   ++v;
     ^
bug.cc:4:6: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in fold_binary_loc, at fold-const.c:10381
   ++v;
      ^
0xd356c6 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/gcc/tree.c:9472
0x91bc32 tree_class_check
        ../../gcc/gcc/tree.h:2815
0x91bc32 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        ../../gcc/gcc/fold-const.c:10381
0x925a2a fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        ../../gcc/gcc/fold-const.c:15048
0x90389d fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        ../../gcc/gcc/fold-const.c:10035
0x925a2a fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        ../../gcc/gcc/fold-const.c:15048
0x98dde6 gimplify_self_mod_expr(tree_node**, gimple_statement_d**,
gimple_statement_d**, bool, tree_node*)
        ../../gcc/gcc/gimplify.c:2400
0x9872aa gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:7665
0x98b956 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5657
0x9884cf gimplify_cleanup_point_expr
        ../../gcc/gcc/gimplify.c:5433
0x9884cf gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:8088
0x98b956 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5657
0x987f1b gimplify_statement_list
        ../../gcc/gcc/gimplify.c:1548
0x987f1b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:8140
0x98b956 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5657
0x98c7e5 gimplify_bind_expr
        ../../gcc/gcc/gimplify.c:1229
0x9883ac gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:7922
0x98b956 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5657
0x98d0ce gimplify_body(tree_node*, bool)
        ../../gcc/gcc/gimplify.c:8832
0x98d626 gimplify_function_tree(tree_node*)
        ../../gcc/gcc/gimplify.c:8970
Please submit a full bug report, [etc.]

Btw, the error message seems to be bogus, too. The C-frontend gives a better
diagnostic (and doesn't crash):

bug.c: In function 'foo':
bug.c:4:3: error: wrong type argument to increment
   ++v;


             reply	other threads:[~2013-11-06 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 20:38 reichelt at gcc dot gnu.org [this message]
2013-11-06 20:40 ` [Bug c++/59032] " reichelt at gcc dot gnu.org
2013-11-07 11:02 ` rguenth at gcc dot gnu.org
2013-11-10  7:54 ` vries at gcc dot gnu.org
2013-11-10  8:56 ` vries at gcc dot gnu.org
2013-11-10  9:40 ` glisse at gcc dot gnu.org
2013-11-10 20:34 ` vries at gcc dot gnu.org
2013-11-10 21:14 ` glisse at gcc dot gnu.org
2013-11-19 14:22 ` rguenth at gcc dot gnu.org
2013-11-24 18:54 ` vries at gcc dot gnu.org
2013-11-27 10:00 ` vries at gcc dot gnu.org
2013-11-27 22:45 ` [Bug c++/59032] [4.8 " reichelt at gcc dot gnu.org
2013-12-02  8:38 ` vries at gcc dot gnu.org
2013-12-02  8:45 ` vries 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-59032-4@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).