public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
@ 2015-03-25 16:46 doko at gcc dot gnu.org
  2015-03-25 17:11 ` [Bug middle-end/65556] " trippels at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: doko at gcc dot gnu.org @ 2015-03-25 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65556
           Summary: [5 Regression] ICE: verify_gimple failed (type
                    precision mismatch in switch statement)
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

Created attachment 35137
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35137&action=edit
preprocessed source

seen building the pcf2bdf package in Debian unstable, using r221551

$ g++ -c -g -O2 -Wno-write-strings pcf2bdf.ii 
pcf2bdf.cc: In function 'int main(int, char**)':
pcf2bdf.cc:559:5: error: type precision mismatch in switch statement
 int main(int argc, char *argv[])
     ^
switch (D.5231) <default: <D.4565>, case 0: <D.4566>, case 1: <D.4571>>
pcf2bdf.cc:559:5: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.


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

* [Bug middle-end/65556] [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
  2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
@ 2015-03-25 17:11 ` trippels at gcc dot gnu.org
  2015-03-25 19:07 ` trippels at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-25 17:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-25
                 CC|                            |trippels at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat pcf2bdf.ii
struct
{
  long id : 1;
} a;
int
main ()
{
  switch (a.id)
  case 0:
  ;
}

markus@x4 tmp % gcc -w -c pcf2bdf.ii
pcf2bdf.ii: In function ‘int main()’:
pcf2bdf.ii:6:1: error: type precision mismatch in switch statement
 main ()
 ^
switch (D.2335) <default: <D.2336>, case 0: <D.2331>>
pcf2bdf.ii:6:1: internal compiler error: verify_gimple failed
0xcec17f verify_gimple_in_seq(gimple_statement_base*)
        ../../gcc/gcc/tree-cfg.c:4737
0xac009c gimplify_body(tree_node*, bool)
        ../../gcc/gcc/gimplify.c:9100
0xac0406 gimplify_function_tree(tree_node*)
        ../../gcc/gcc/gimplify.c:9185
0x90c2b7 cgraph_node::analyze()
        ../../gcc/gcc/cgraphunit.c:633
0x90f36d analyze_functions
        ../../gcc/gcc/cgraphunit.c:1023
0x90fc55 symbol_table::finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2435
0x6ec4c7 cp_write_global_declarations()
        ../../gcc/gcc/cp/decl2.c:4755
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-481647-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Mar 25 17:01:22 2015
Return-Path: <gcc-bugs-return-481647-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 35664 invoked by alias); 25 Mar 2015 17:01:22 -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 35605 invoked by uid 48); 25 Mar 2015 17:01:18 -0000
From: "webrown.cpp at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65553] ICE on valid variadic template
Date: Wed, 25 Mar 2015 17:14: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: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: webrown.cpp at gmail dot com
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: cc
Message-ID: <bug-65553-4-8CmF0qnOe5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65553-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65553-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-03/txt/msg02791.txt.bz2
Content-length: 670

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

W E Brown <webrown.cpp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew.n.sutton at gmail dot com

--- Comment #3 from W E Brown <webrown.cpp at gmail dot com> ---
Hmm.  Looks like this was fairly recently fixed.  After I updated from version
  g++-mp-5 (MacPorts gcc5 5-20150308_0) 5.0.0 20150308 (experimental)

to version
  g++-mp-5 (MacPorts gcc5 5-20150322_0) 5.0.0 20150322 (experimental)

the attachment now compiles successfully.

Thank you.


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

* [Bug middle-end/65556] [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
  2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
  2015-03-25 17:11 ` [Bug middle-end/65556] " trippels at gcc dot gnu.org
@ 2015-03-25 19:07 ` trippels at gcc dot gnu.org
  2015-03-26 11:19 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-25 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.0                         |---


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

* [Bug middle-end/65556] [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
  2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
  2015-03-25 17:11 ` [Bug middle-end/65556] " trippels at gcc dot gnu.org
  2015-03-25 19:07 ` trippels at gcc dot gnu.org
@ 2015-03-26 11:19 ` rguenth at gcc dot gnu.org
  2015-03-26 11:27 ` [Bug c++/65556] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-26 11:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |5.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.


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

* [Bug c++/65556] [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
  2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-03-26 11:19 ` rguenth at gcc dot gnu.org
@ 2015-03-26 11:27 ` rguenth at gcc dot gnu.org
  2015-03-26 12:12 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-26 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
          Component|middle-end                  |c++
           Assignee|rguenth at gcc dot gnu.org         |unassigned at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we have

D.2334 = a.id;
D.2335 = (int) D.2334;
switch (D.2335) <default: <D.2336>, case 0: <D.2331>>

and

 <case_label_expr 0x7ffff68d80e0
    type <void_type 0x7ffff68f2000 void VOID
        align 8 symtab 0 alias set -1 canonical type 0x7ffff68f2000
        pointer_to_this <pointer_type 0x7ffff68f2150>>
    side-effects tree_1
    arg 0 <integer_cst 0x7ffff6a46d80 type <integer_type 0x7ffff68d07e0 long
int> constant 0>
    arg 2 <label_decl 0x7ffff6a4a100 D.2331 type <void_type 0x7ffff68f2000
void>
        ignored VOID file t.c line 9 col 1
        align 1 context <function_decl 0x7ffff6a4d000 main>>
    t.c:9:1>

which has a 'long int' value.  The original C++ code already looks bogus:

switch ((int) a.id)
  {
    case 0:;
  }

so there seems to be a disconnect in the C++ frontend for how the switch
variable and the cases promote.


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

* [Bug c++/65556] [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
  2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-03-26 11:27 ` [Bug c++/65556] " rguenth at gcc dot gnu.org
@ 2015-03-26 12:12 ` mpolacek at gcc dot gnu.org
  2015-03-27 16:59 ` mpolacek at gcc dot gnu.org
  2015-03-27 17:03 ` mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-26 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |mpolacek at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r215559, so mine.


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

* [Bug c++/65556] [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
  2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-03-26 12:12 ` mpolacek at gcc dot gnu.org
@ 2015-03-27 16:59 ` mpolacek at gcc dot gnu.org
  2015-03-27 17:03 ` mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-27 16:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Mar 27 16:46:44 2015
New Revision: 221738

URL: https://gcc.gnu.org/viewcvs?rev=221738&root=gcc&view=rev
Log:
    PR c++/65556
    * semantics.c (finish_switch_cond): If the unlowered type is not an
    enum, use the type of the condition.

    * c-c++-common/pr65556.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/pr65556.c
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/65556] [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement)
  2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-03-27 16:59 ` mpolacek at gcc dot gnu.org
@ 2015-03-27 17:03 ` mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-27 17:03 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-03-27 16:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 16:46 [Bug middle-end/65556] New: [5 Regression] ICE: verify_gimple failed (type precision mismatch in switch statement) doko at gcc dot gnu.org
2015-03-25 17:11 ` [Bug middle-end/65556] " trippels at gcc dot gnu.org
2015-03-25 19:07 ` trippels at gcc dot gnu.org
2015-03-26 11:19 ` rguenth at gcc dot gnu.org
2015-03-26 11:27 ` [Bug c++/65556] " rguenth at gcc dot gnu.org
2015-03-26 12:12 ` mpolacek at gcc dot gnu.org
2015-03-27 16:59 ` mpolacek at gcc dot gnu.org
2015-03-27 17:03 ` mpolacek 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).