public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
@ 2012-10-06  7:23 zsojka at seznam dot cz
  2012-10-07 11:34 ` [Bug tree-optimization/54831] " mpolacek at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zsojka at seznam dot cz @ 2012-10-06  7:23 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54831
           Summary: [4.8 Regression] ICE: in vt_add_function_parameter, at
                    var-tracking.c:9412 with -O -fno-split-wide-types -g
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 28368
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28368
reduced testcase

Compiler output:
$ gcc -O -fno-split-wide-types -g testcase.C 
testcase.C: In function 'void foo(mptr)':
testcase.C:16:1: internal compiler error: in vt_add_function_parameter, at
var-tracking.c:9412
 }
 ^
0xd7814a vt_add_function_parameter
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:9412
0xd7825f vt_add_function_parameters
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:9516
0xd78db7 vt_initialize
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:9772
0xd827d6 variable_tracking_main_1
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:10016
0xd827d6 variable_tracking_main()
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:10069
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.

Tested revisions:
r192080 - crash
r191586 - crash
4.7 r191640 - OK


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

* [Bug tree-optimization/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
@ 2012-10-07 11:34 ` mpolacek at gcc dot gnu.org
  2012-10-07 11:35 ` mpolacek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-07 11:34 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-07 11:34:37 UTC ---
Started with http://gcc.gnu.org/viewcvs?view=revision&revision=190492


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

* [Bug tree-optimization/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
  2012-10-07 11:34 ` [Bug tree-optimization/54831] " mpolacek at gcc dot gnu.org
@ 2012-10-07 11:35 ` mpolacek at gcc dot gnu.org
  2012-10-07 17:00 ` [Bug debug/54831] " hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-07 11:35 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-07
     Ever Confirmed|0                           |1

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-07 11:35:17 UTC ---
Thus confirmed.


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
  2012-10-07 11:34 ` [Bug tree-optimization/54831] " mpolacek at gcc dot gnu.org
  2012-10-07 11:35 ` mpolacek at gcc dot gnu.org
@ 2012-10-07 17:00 ` hjl.tools at gmail dot com
  2012-10-07 17:10 ` hjl.tools at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-07 17:00 UTC (permalink / raw)
  To: gcc-bugs


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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|hjl at gcc dot gnu.org      |aoliva at gcc dot gnu.org,
                   |                            |hjl.tools at gmail dot com
          Component|tree-optimization           |debug

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-07 17:00:21 UTC ---
vt_add_function_parameter fails to properly handle

(gdb) call debug_tree (parm)
 <parm_decl 0x7ffff1aee180 f
    type <record_type 0x7ffff1ae7930 mptr TI
        size <integer_cst 0x7ffff197ee40 constant 128>
        unit size <integer_cst 0x7ffff197ee60 constant 16>
        align 64 symtab -241540480 alias set -1 canonical type 0x7ffff1ae7888
        fields <field_decl 0x7ffff1ae5720 __pfn type <pointer_type
0x7ffff1ae77e0>
            unsigned DI file x.ii line 7 col 26
            size <integer_cst 0x7ffff197edc0 constant 64>
            unit size <integer_cst 0x7ffff197ede0 constant 8>
            align 64 offset_align 128
            offset <integer_cst 0x7ffff197ee00 constant 0>
            bit offset <integer_cst 0x7ffff197ee80 constant 0> context
<record_type 0x7ffff1ae7888> chain <field_decl 0x7ffff1ae57b8 __delta>>
        ptrmemfunc fn type <pointer_type 0x7ffff1ae77e0 type <method_type
0x7ffff1ae7738>
            asm_written unsigned DI size <integer_cst 0x7ffff197edc0 64> unit
size <integer_cst 0x7ffff197ede0 8>
            align 64 symtab -241540080 alias set -1 canonical type
0x7ffff1ae77e0>
        pointer_to_this <pointer_type 0x7ffff1af4150> chain <type_decl
0x7ffff1ae3a10 __ptrmemfunc_type>>
    used TI file x.ii line 12 col 16 size <integer_cst 0x7ffff197ee40 128> unit
size <integer_cst 0x7ffff197ee60 16>
    align 64 context <function_decl 0x7ffff1ae6c00 foo>

    (mem/c:TI (symbol_ref:DI ("gmp") [flags 0x2] <var_decl 0x7ffff1ae5850 gmp>)
[0 gmp+0 S16 A64]) arg-type <record_type 0x7ffff1ae7930 mptr>
    incoming-rtl (parallel:TI [
        (expr_list:REG_DEP_TRUE (reg:DI 5 di [ f ])
            (const_int 0 [0]))
        (expr_list:REG_DEP_TRUE (reg:DI 4 si [ f+8 ])
            (const_int 8 [0x8]))
    ])>
(gdb)


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-10-07 17:00 ` [Bug debug/54831] " hjl.tools at gmail dot com
@ 2012-10-07 17:10 ` hjl.tools at gmail dot com
  2012-10-08  8:45 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-07 17:10 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-07 17:10:13 UTC ---
Shouldn't vt_get_decl_and_offset handle:

vt_get_decl_and_offset (rtl=0x7ffff1abad60, declp=0x7fffffffda00, 
    offsetp=0x7fffffffda08)
    at /export/gnu/import/git/gcc/gcc/var-tracking.c:9275
9275      if (REG_P (rtl))
(gdb) call debug_rtx (rtl)
(parallel:TI [
        (expr_list:REG_DEP_TRUE (reg:DI 5 di [ f ])
            (const_int 0 [0]))
        (expr_list:REG_DEP_TRUE (reg:DI 4 si [ f+8 ])
            (const_int 8 [0x8]))
    ])
(gdb)


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2012-10-07 17:10 ` hjl.tools at gmail dot com
@ 2012-10-08  8:45 ` jakub at gcc dot gnu.org
  2012-10-08 10:36 ` mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-08  8:45 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-08 08:44:50 UTC ---
That doesn't make much sense, as it wouldn't be tracked anyway, too much code
would need to be changed to also track PARALLELs.
I'd say the easiest fix would be just turn that gcc_assert into
if (!assert_cond) return; and adjust the comment not to say that we assert
something.  Alex, what do you think?


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2012-10-08  8:45 ` jakub at gcc dot gnu.org
@ 2012-10-08 10:36 ` mpolacek at gcc dot gnu.org
  2012-10-08 10:50 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-08 10:36 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-08 10:35:46 UTC ---
Created attachment 28384
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28384
Untested fix

Per #c5.


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2012-10-08 10:36 ` mpolacek at gcc dot gnu.org
@ 2012-10-08 10:50 ` rguenth at gcc dot gnu.org
  2012-10-08 14:11 ` aoliva at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-08 10:50 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2012-10-08 10:50 ` rguenth at gcc dot gnu.org
@ 2012-10-08 14:11 ` aoliva at gcc dot gnu.org
  2012-10-08 17:41 ` mpolacek at gcc dot gnu.org
  2012-10-08 17:41 ` mpolacek at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: aoliva at gcc dot gnu.org @ 2012-10-08 14:11 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2012-10-08 14:10:25 UTC ---
Marek, the patch looks good, thanks.


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2012-10-08 14:11 ` aoliva at gcc dot gnu.org
@ 2012-10-08 17:41 ` mpolacek at gcc dot gnu.org
  2012-10-08 17:41 ` mpolacek at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-08 17:41 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-08 17:40:53 UTC ---
Author: mpolacek
Date: Mon Oct  8 17:38:13 2012
New Revision: 192218

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192218
Log:
PR54831.

Added:
    trunk/gcc/testsuite/g++.dg/debug/pr54831.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/var-tracking.c


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

* [Bug debug/54831] [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g
  2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2012-10-08 17:41 ` mpolacek at gcc dot gnu.org
@ 2012-10-08 17:41 ` mpolacek at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-08 17:41 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-08 17:41:19 UTC ---
Fixed.


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

end of thread, other threads:[~2012-10-08 17:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-06  7:23 [Bug tree-optimization/54831] New: [4.8 Regression] ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g zsojka at seznam dot cz
2012-10-07 11:34 ` [Bug tree-optimization/54831] " mpolacek at gcc dot gnu.org
2012-10-07 11:35 ` mpolacek at gcc dot gnu.org
2012-10-07 17:00 ` [Bug debug/54831] " hjl.tools at gmail dot com
2012-10-07 17:10 ` hjl.tools at gmail dot com
2012-10-08  8:45 ` jakub at gcc dot gnu.org
2012-10-08 10:36 ` mpolacek at gcc dot gnu.org
2012-10-08 10:50 ` rguenth at gcc dot gnu.org
2012-10-08 14:11 ` aoliva at gcc dot gnu.org
2012-10-08 17:41 ` mpolacek at gcc dot gnu.org
2012-10-08 17:41 ` 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).