public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/61120] New: wide-int merge causes segfault in cc1
@ 2014-05-08 23:01 olegendo at gcc dot gnu.org
  2014-05-09  0:09 ` [Bug driver/61120] " kkojima at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-05-08 23:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61120
           Summary: wide-int merge causes segfault in cc1
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org
                CC: kyrylo.tkachov at arm dot com, mikestump at comcast dot net,
                    rsandifo at redhat dot com, zadeck at naturalbridge dot com
            Target: sh*-*-*

Created attachment 32765
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32765&action=edit
Test file

Compiling the attached preprocessed file with an r210113 SH cross compiler
causes the following:

xgcc: internal compiler error: Segmentation fault (program cc1)
0x8053cf0 execute
    ../../gcc-trunk2/gcc/gcc.c:2848
0x80540d4 do_spec_1
    ../../gcc-trunk2/gcc/gcc.c:4652
0x80565b1 process_brace_body
    ../../gcc-trunk2/gcc/gcc.c:5935
0x80565b1 handle_braces
    ../../gcc-trunk2/gcc/gcc.c:5849
0x8054604 do_spec_1
    ../../gcc-trunk2/gcc/gcc.c:5306
0x80565b1 process_brace_body
    ../../gcc-trunk2/gcc/gcc.c:5935
0x80565b1 handle_braces
    ../../gcc-trunk2/gcc/gcc.c:5849
0x8054604 do_spec_1
    ../../gcc-trunk2/gcc/gcc.c:5306
0x80545a9 do_spec_1
    ../../gcc-trunk2/gcc/gcc.c:5421
0x80565b1 process_brace_body
    ../../gcc-trunk2/gcc/gcc.c:5935
0x80565b1 handle_braces
    ../../gcc-trunk2/gcc/gcc.c:5849
0x8054604 do_spec_1
    ../../gcc-trunk2/gcc/gcc.c:5306
0x80565b1 process_brace_body
    ../../gcc-trunk2/gcc/gcc.c:5935
0x80565b1 handle_braces
    ../../gcc-trunk2/gcc/gcc.c:5849
0x8054604 do_spec_1
    ../../gcc-trunk2/gcc/gcc.c:5306
0x80565b1 process_brace_body
    ../../gcc-trunk2/gcc/gcc.c:5935
0x80565b1 handle_braces
    ../../gcc-trunk2/gcc/gcc.c:5849
0x8054604 do_spec_1
    ../../gcc-trunk2/gcc/gcc.c:5306
0x80565b1 process_brace_body
    ../../gcc-trunk2/gcc/gcc.c:5935
0x80565b1 handle_braces
    ../../gcc-trunk2/gcc/gcc.c:5849
Please submit a full bug report,
with preprocessed source if appropriate.

I'm a bit lost here.  If you need/have more info, please let me know.


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

* [Bug driver/61120] wide-int merge causes segfault in cc1
  2014-05-08 23:01 [Bug driver/61120] New: wide-int merge causes segfault in cc1 olegendo at gcc dot gnu.org
@ 2014-05-09  0:09 ` kkojima at gcc dot gnu.org
  2014-05-09  0:30 ` glisse at gcc dot gnu.org
  2014-05-09 11:05 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: kkojima at gcc dot gnu.org @ 2014-05-09  0:09 UTC (permalink / raw)
  To: gcc-bugs

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

Kazumoto Kojima <kkojima at gcc dot gnu.org> changed:

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

--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
With the test case, gdb for i686-linux cc1 shows:

Program received signal SIGSEGV, Segmentation fault.
0x08890655 in wide_int_to_tree (type=type@entry=0xb7de8360, pcst=...)
    at ../../ORIG/trunk/gcc/tree.c:1205
1205      unsigned int prec = TYPE_PRECISION (type);

(gdb) call debug_tree (type)
Cannot access memory at address 0xbbffffaf
(gdb) bt
#0  0x088c9565 in wide_int_to_tree (type=type@entry=0xb7dea360, pcst=...)
    at ../../ORIG/trunk/gcc/tree.c:1205
#1  0x088c9f67 in build_int_cst_type (type=0xb7dea360, low=255)
    at ../../ORIG/trunk/gcc/tree.c:1099
#2  0x083fb1d6 in fold_binary_loc (loc=loc@entry=415872, 
    code=code@entry=BIT_AND_EXPR, type=type@entry=0xb7dea360, 
    op0=op0@entry=0xb7f3d1e0, op1=op1@entry=0xb7f36c30)
    at ../../ORIG/trunk/gcc/fold-const.c:12031
#3  0x08401433 in fold_build2_stat_loc (loc=415872, 
    code=code@entry=BIT_AND_EXPR, type=0xb7dea360, op0=0xb7f3d1e0, 
    op1=op1@entry=0xb7f36c30) at ../../ORIG/trunk/gcc/fold-const.c:14995
#4  0x083ea25e in fold_binary_loc (loc=loc@entry=415872, 
    code=code@entry=BIT_IOR_EXPR, type=type@entry=0xb7dea360, 
    op0=op0@entry=0xb7a24b10, op1=op1@entry=0xb7e698fc)
    at ../../ORIG/trunk/gcc/fold-const.c:11371
#5  0x08401433 in fold_build2_stat_loc (loc=415872, 
    code=code@entry=BIT_IOR_EXPR, type=0xb7dea360, op0=0xb7a24b10, 
    op1=op1@entry=0xb7e698fc) at ../../ORIG/trunk/gcc/fold-const.c:14995
#6  0x083ea280 in fold_binary_loc (loc=loc@entry=415872, 
    code=code@entry=BIT_IOR_EXPR, type=type@entry=0xb7dea360, 
    op0=op0@entry=0xb7a24af8, op1=op1@entry=0xb7e698fc)
    at ../../ORIG/trunk/gcc/fold-const.c:11371
#7  0x08401433 in fold_build2_stat_loc (loc=415872, 
---Type <return> to continue, or q <return> to quit---
   code=code@entry=BIT_IOR_EXPR, type=0xb7dea360, op0=0xb7a24af8, 
    op1=op1@entry=0xb7e698fc) at ../../ORIG/trunk/gcc/fold-const.c:14995
#8  0x083ea280 in fold_binary_loc (loc=loc@entry=415872, 
    code=code@entry=BIT_IOR_EXPR, type=type@entry=0xb7dea360, 
    op0=op0@entry=0xb7a24ae0, op1=op1@entry=0xb7e698fc)
    at ../../ORIG/trunk/gcc/fold-const.c:11371
#9  0x08401433 in fold_build2_stat_loc (loc=415872, 
    code=code@entry=BIT_IOR_EXPR, type=0xb7dea360, op0=0xb7a24ae0, 
    op1=op1@entry=0xb7e698fc) at ../../ORIG/trunk/gcc/fold-const.c:14995
#10 0x083ea280 in fold_binary_loc (loc=loc@entry=415872, 
    code=code@entry=BIT_IOR_EXPR, type=type@entry=0xb7dea360, 
    op0=op0@entry=0xb7a24ac8, op1=op1@entry=0xb7e698fc)
    at ../../ORIG/trunk/gcc/fold-const.c:11371
#11 0x08401433 in fold_build2_stat_loc (loc=415872, 
    code=code@entry=BIT_IOR_EXPR, type=0xb7dea360, op0=0xb7a24ac8, 
    op1=op1@entry=0xb7e698fc) at ../../ORIG/trunk/gcc/fold-const.c:14995
#12 0x083ea280 in fold_binary_loc (loc=loc@entry=415872, 
    code=code@entry=BIT_IOR_EXPR, type=type@entry=0xb7dea360, 
    op0=op0@entry=0xb7a24ab0, op1=op1@entry=0xb7e698fc)
    at ../../ORIG/trunk/gcc/fold-const.c:11371
#13 0x08401433 in fold_build2_stat_loc (loc=415872, 
    code=code@entry=BIT_IOR_EXPR, type=0xb7dea360, op0=0xb7a24ab0, 
    op1=op1@entry=0xb7e698fc) at ../../ORIG/trunk/gcc/fold-const.c:14995
...

It seems that there is an infinite recursion with fold_binary_loc and
fold_build2_stat_loc.


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

* [Bug driver/61120] wide-int merge causes segfault in cc1
  2014-05-08 23:01 [Bug driver/61120] New: wide-int merge causes segfault in cc1 olegendo at gcc dot gnu.org
  2014-05-09  0:09 ` [Bug driver/61120] " kkojima at gcc dot gnu.org
@ 2014-05-09  0:30 ` glisse at gcc dot gnu.org
  2014-05-09 11:05 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-05-09  0:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #1)
> It seems that there is an infinite recursion with fold_binary_loc and
> fold_build2_stat_loc.

Likely a dup of PR 61111 then.


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

* [Bug driver/61120] wide-int merge causes segfault in cc1
  2014-05-08 23:01 [Bug driver/61120] New: wide-int merge causes segfault in cc1 olegendo at gcc dot gnu.org
  2014-05-09  0:09 ` [Bug driver/61120] " kkojima at gcc dot gnu.org
  2014-05-09  0:30 ` glisse at gcc dot gnu.org
@ 2014-05-09 11:05 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-09 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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


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

end of thread, other threads:[~2014-05-09 11:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-08 23:01 [Bug driver/61120] New: wide-int merge causes segfault in cc1 olegendo at gcc dot gnu.org
2014-05-09  0:09 ` [Bug driver/61120] " kkojima at gcc dot gnu.org
2014-05-09  0:30 ` glisse at gcc dot gnu.org
2014-05-09 11:05 ` rguenth 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).