Bug 61712

Summary: thumb1_reorg crashes
Product: gcc Reporter: linzj <manjian2006>
Component: rtl-optimizationAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: amker, ktkachov
Priority: P3    
Version: 4.9.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Attachments: source that crashes

Description linzj 2014-07-04 03:39:35 UTC
Compiling the attached source will result in the crash.
arm-linux-androideabi-g++ -c -fpic -ffunction-sections -funwind-tables -fstack-protector -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -gdwarf-2 -funwind-tables -fno-pic -fPIC -fno-stack-protector -fvisibility=hidden -gdwarf-2 -funwind-tables -fno-pic -fPIC -fno-stack-protector -fvisibility=hidden -fvisibility-inlines-hidden -Wa,--noexecstack -O0 -g -Wreturn-type -Wuninitialized  /tmp/1.cpp

/media/linzj/normal/home/linzj/src/u3/shell-git/core/WebCore/bindings/v8/V8DOMWrapper.h: In static member function 'static v8::Handle<v8::Object> WebCore::V8DOMWrapper::getWrapper(WebCore::Node*)':
/media/linzj/normal/home/linzj/src/u3/shell-git/core/WebCore/bindings/v8/V8DOMWrapper.h:136:9: internal compiler error: Segmentation fault
         }
         ^
0x94564f crash_signal
	../../building/gcc/toplev.c:337
0xb523a8 thumb1_reorg
	../../building/gcc/config/arm/arm.c:16728
0xb523a8 arm_reorg
	../../building/gcc/config/arm/arm.c:16981
0x8fc039 rest_of_handle_machine_reorg
	../../building/gcc/reorg.c:3936
0x8fc039 execute
	../../building/gcc/reorg.c:3966
Please submit a full bug report,



As far as I debug, I find out:
      /* Find the last cbranchsi4_insn in basic block BB.  */
      if (INSN_CODE (insn) != CODE_FOR_cbranchsi4_insn)
	continue;

      /* Get the register with which we are comparing.  */
=>      pat = PATTERN (insn);
      op0 = XEXP (XEXP (SET_SRC (pat), 0), 0);

pat is NULL.
Comment 1 linzj 2014-07-04 03:43:29 UTC
Created attachment 33068 [details]
source that crashes
Comment 2 ktkachov 2014-07-04 08:01:36 UTC
*** Bug 61703 has been marked as a duplicate of this bug. ***
Comment 3 ktkachov 2014-07-04 08:02:17 UTC
*** Bug 61704 has been marked as a duplicate of this bug. ***
Comment 4 ktkachov 2014-07-04 08:02:47 UTC
*** Bug 61705 has been marked as a duplicate of this bug. ***
Comment 5 ktkachov 2014-07-04 08:03:11 UTC
*** Bug 61702 has been marked as a duplicate of this bug. ***
Comment 6 ktkachov 2014-07-04 08:03:51 UTC
*** Bug 61706 has been marked as a duplicate of this bug. ***
Comment 7 ktkachov 2014-07-04 08:04:30 UTC
*** Bug 61707 has been marked as a duplicate of this bug. ***
Comment 8 ktkachov 2014-07-04 08:05:05 UTC
*** Bug 61708 has been marked as a duplicate of this bug. ***
Comment 9 ktkachov 2014-07-04 08:05:27 UTC
*** Bug 61710 has been marked as a duplicate of this bug. ***
Comment 10 ktkachov 2014-07-04 08:05:51 UTC
*** Bug 61709 has been marked as a duplicate of this bug. ***
Comment 11 ktkachov 2014-07-04 08:06:13 UTC
*** Bug 61711 has been marked as a duplicate of this bug. ***
Comment 12 ktkachov 2014-07-04 08:07:24 UTC
I can't reproduce this with current trunk, on what compiler version does this trigger?

*gcc -v should tell this
Comment 13 linzj 2014-07-04 08:22:37 UTC
(In reply to ktkachov from comment #12)
> I can't reproduce this with current trunk, on what compiler version does
> this trigger?
> 
> *gcc -v should tell this

arm-linux-androideabi-gcc (GCC) 4.9.1 20140704 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


commit ad1c36144f315b81651673aaeb72be0f6b0ec757
Author: gccadmin <gccadmin@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Jul 4 00:16:42 2014 +0000

    Daily bump.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212276 138bc75d-0d04-0410-961f-82ee72b054a4
Comment 14 linzj 2014-07-04 08:23:07 UTC
I have already submited a patch too.
Comment 15 bin cheng 2014-07-04 09:20:13 UTC
I think this is fixed on trunk by:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3df31d76aa8c14ff871fc15b931d277b8d68626a

2014-06-18  Terry Guo  <terry.guo@arm.com>

PR target/61544
* config/arm/arm.c (thumb1_reorg): Move to next basic block if we
reach the head.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211775 138bc75d-0d04-0410-961f-82ee72b054a4

I will ask for backport of the patch.
Comment 16 linzj 2014-07-04 09:34:15 UTC
Thanks amker.
Comment 17 Richard Earnshaw 2014-07-07 18:20:06 UTC
*** Bug 61694 has been marked as a duplicate of this bug. ***
Comment 18 Richard Earnshaw 2014-07-29 10:50:18 UTC
Duplicate.

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