public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
@ 2015-07-29 10:49 balder@yahoo-inc.com
  2015-07-29 11:08 ` [Bug c++/67055] " trippels at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: balder@yahoo-inc.com @ 2015-07-29 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67055
           Summary: Segmentation fault in fold_builtin_alloca_with_align
                    in tree-ssa-ccp.c
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: balder@yahoo-inc.com
  Target Milestone: ---

Created attachment 36087
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36087&action=edit
This is the full output from the build with stdout and stdin redirected to
file.

When upgrading our compiler version from 4.9.3 to 5.2.0 our build fails with
following message.

....
....
In file included from mallocdst16.cpp:31:0:
../../vespamalloc/malloc/overload.h: In function ‘void* operator
new(std::size_t, const std::nothrow_t&)’:
../../vespamalloc/malloc/overload.h:41:7: internal compiler error: Segmentation
fault
 void* operator new(std::size_t sz, const std::nothrow_t&) noexcept {
       ^
0xa34c65 crash_signal
        ../.././gcc/toplev.c:383
0xaf7486 fold_builtin_alloca_with_align
        ../.././gcc/tree-ssa-ccp.c:2066
0xaf7486 ccp_fold_stmt
        ../.././gcc/tree-ssa-ccp.c:2172
0xb6738a substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        ../.././gcc/tree-ssa-propagate.c:1176
0xfcdd3a dom_walker::walk(basic_block_def*)
        ../.././gcc/domwalk.c:188
0xb65a1b substitute_and_fold(tree_node* (*)(tree_node*), bool
(*)(gimple_stmt_iterator*), bool)
        ../.././gcc/tree-ssa-propagate.c:1272
0xaf196b ccp_finalize
        ../.././gcc/tree-ssa-ccp.c:941
0xaf2adf do_ssa_ccp
        ../.././gcc/tree-ssa-ccp.c:2382
0xaf2adf execute
        ../.././gcc/tree-ssa-ccp.c:2414
Please submit a full bug report,
...
...
>From gcc-bugs-return-493638-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 29 10:51:59 2015
Return-Path: <gcc-bugs-return-493638-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 44064 invoked by alias); 29 Jul 2015 10:51:59 -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 43535 invoked by uid 48); 29 Jul 2015 10:51:56 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG
Date: Wed, 29 Jul 2015 10:51:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: REOPENED
X-Bugzilla-Resolution:
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: bug_status resolution
Message-ID: <bug-66752-4-10GZ4bV2co@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66752-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66752-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-07/txt/msg02528.txt.bz2
Content-length: 428

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

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

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

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reopen.


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

* [Bug c++/67055] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
@ 2015-07-29 11:08 ` trippels at gcc dot gnu.org
  2015-07-29 11:43 ` balder@yahoo-inc.com
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-29 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-07-29
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Please attach the preprocessed mallocdst16.ii file.


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

* [Bug c++/67055] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
  2015-07-29 11:08 ` [Bug c++/67055] " trippels at gcc dot gnu.org
@ 2015-07-29 11:43 ` balder@yahoo-inc.com
  2015-07-29 11:45 ` balder@yahoo-inc.com
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: balder@yahoo-inc.com @ 2015-07-29 11:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Henning Baldersheim <balder@yahoo-inc.com> ---
Created attachment 36088
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36088&action=edit
the .ii file in gziped format


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

* [Bug c++/67055] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
  2015-07-29 11:08 ` [Bug c++/67055] " trippels at gcc dot gnu.org
  2015-07-29 11:43 ` balder@yahoo-inc.com
@ 2015-07-29 11:45 ` balder@yahoo-inc.com
  2015-07-29 11:48 ` balder@yahoo-inc.com
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: balder@yahoo-inc.com @ 2015-07-29 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Henning Baldersheim <balder@yahoo-inc.com> ---
Created attachment 36089
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36089&action=edit
.s file

I also add the .s file that was generated with the -save-temps option


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

* [Bug c++/67055] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (2 preceding siblings ...)
  2015-07-29 11:45 ` balder@yahoo-inc.com
@ 2015-07-29 11:48 ` balder@yahoo-inc.com
  2015-07-29 12:21 ` [Bug tree-optimization/67055] 5/6 Regression] " trippels at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: balder@yahoo-inc.com @ 2015-07-29 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Henning Baldersheim <balder@yahoo-inc.com> ---
If I use -O2 instead of -O3 it builds fine.


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

* [Bug tree-optimization/67055] 5/6 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (3 preceding siblings ...)
  2015-07-29 11:48 ` balder@yahoo-inc.com
@ 2015-07-29 12:21 ` trippels at gcc dot gnu.org
  2015-07-29 12:51 ` [Bug tree-optimization/67055] [5/6 " trippels at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-29 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
          Component|c++                         |tree-optimization
            Summary|Segmentation fault in       |5/6 Regression]
                   |fold_builtin_alloca_with_al |Segmentation fault in
                   |ign in tree-ssa-ccp.c       |fold_builtin_alloca_with_al
                   |                            |ign in tree-ssa-ccp.c
           Severity|major                       |normal

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
trippels@gcc75 ~ % cat mallocdst16.ii
namespace std {
typedef long unsigned size_t;
struct nothrow_t;
}
namespace vespamalloc {
void fn1(void *);
template <typename> class A {
public:
  static unsigned long fillStack(unsigned long);
};
template <typename StackRep>
unsigned long A<StackRep>::fillStack(unsigned long p1) {
  void *retAddr[p1];
  fn1(retAddr);
}
class B {
protected:
  B(void *);
};
template <int StackTraceLen> class D : B {
public:
  D() : B(0) {}
  void alloc(int) { A<int>::fillStack(StackTraceLen); }
};
template <typename, typename> class C {
public:
  void *malloc(unsigned long);
};
template <typename MemBlockPtrT, typename ThreadListT>
void *C<MemBlockPtrT, ThreadListT>::malloc(unsigned long) {
  MemBlockPtrT mem;
  mem.alloc(0);
}
C<D<16>, int> *_GmemP;
}
void *operator new(std::size_t, std::nothrow_t &) noexcept {
  return vespamalloc::_GmemP->malloc(0);
}
void *operator new[](std::size_t, std::nothrow_t &) noexcept {
  return vespamalloc::_GmemP->malloc(0);
}

trippels@gcc75 ~ % g++ -std=c++14 -O3 -c mallocdst16.ii
mallocdst16.ii: In function ?void* operator new(std::size_t, std::nothrow_t&)?:
mallocdst16.ii:36:7: internal compiler error: Segmentation fault


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

* [Bug tree-optimization/67055] [5/6 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (4 preceding siblings ...)
  2015-07-29 12:21 ` [Bug tree-optimization/67055] 5/6 Regression] " trippels at gcc dot gnu.org
@ 2015-07-29 12:51 ` trippels at gcc dot gnu.org
  2015-07-29 12:52 ` trippels at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-29 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Started with r65150.


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

* [Bug tree-optimization/67055] [5/6 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (5 preceding siblings ...)
  2015-07-29 12:51 ` [Bug tree-optimization/67055] [5/6 " trippels at gcc dot gnu.org
@ 2015-07-29 12:52 ` trippels at gcc dot gnu.org
  2015-07-29 13:01 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-07-29 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Actually, it started with r221040 aka PR bootstrap/65150 fix.


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

* [Bug tree-optimization/67055] [5/6 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (6 preceding siblings ...)
  2015-07-29 12:52 ` trippels at gcc dot gnu.org
@ 2015-07-29 13:01 ` rguenth at gcc dot gnu.org
  2015-08-05  4:24 ` hp at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-29 13:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |5.3


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

* [Bug tree-optimization/67055] [5/6 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (7 preceding siblings ...)
  2015-07-29 13:01 ` rguenth at gcc dot gnu.org
@ 2015-08-05  4:24 ` hp at gcc dot gnu.org
  2015-08-05  7:59 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: hp at gcc dot gnu.org @ 2015-08-05  4:24 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

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

--- Comment #9 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
Created attachment 36130
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36130&action=edit
rcutorture.c reduced, compile with -O2.

Everybody loves a C test-case.  This one will expose the same message for at
least cris-elf at -O2, so I presume it is the same bug.  Observed for r226568.

The attached file is reduced from kernel/rcu/rcutorture.c
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git tag
next-20150720 compiling for cris-linux, but with the reduced code edited to
avoid warnings.

Thanks to Chen Gang for the initial report.


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

* [Bug tree-optimization/67055] [5/6 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (8 preceding siblings ...)
  2015-08-05  4:24 ` hp at gcc dot gnu.org
@ 2015-08-05  7:59 ` rguenth at gcc dot gnu.org
  2015-08-25  7:41 ` [Bug tree-optimization/67055] [5 " trippels at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-05  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
2118      threshold = (unsigned HOST_WIDE_INT)PARAM_VALUE
(PARAM_LARGE_STACK_FRAME);
2119      /* In case the alloca is located at function entry, it has the same
lifetime
2120         as a declared array, so we allow a larger size.  */
2121      block = gimple_block (stmt);
2122      if (!(cfun->after_inlining
2123            && TREE_CODE (BLOCK_SUPERCONTEXT (block)) == FUNCTION_DECL))
2124        threshold /= 10;
2125      if (size > threshold)
2126        return NULL_TREE;
2127
(gdb) p stmt
$2 = <gimple_call 0x7ffff6a57d80>
(gdb) p debug_gimple_stmt (stmt)
# .MEM_11 = VDEF <.MEM_10>
retAddr.2_7 = __builtin_alloca_with_align (128, 64);
$3 = void

so the fix looks obvious (well, in case the alloca_with_align really is
supposed to have no BLOCK which looks pessimizing).

Looks like we've come the

      if (gimple_block (stmt))
        {
... remap block tree ...
        }
      else
        remap_blocks_to_null (DECL_INITIAL (fn), id);

path during inlining.  So the call we inline wasn't associated with any BLOCK.
That's

retval.11_5 = operator new [] (_2(D), _3(D)); [tail call]

which is created from cgraph_node::expand_thunk.  Indeed thunks do not have
any associated BLOCK.

Testing fix.


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

* [Bug tree-optimization/67055] [5 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (9 preceding siblings ...)
  2015-08-05  7:59 ` rguenth at gcc dot gnu.org
@ 2015-08-25  7:41 ` trippels at gcc dot gnu.org
  2015-09-10 15:51 ` trippels at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-08-25  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[5/6 Regression]            |[5 Regression] Segmentation
                   |Segmentation fault in       |fault in
                   |fold_builtin_alloca_with_al |fold_builtin_alloca_with_al
                   |ign in tree-ssa-ccp.c       |ign in tree-ssa-ccp.c

--- Comment #13 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Another testcase:

trippels@gcc2-power8 ~ % cat syn.i
struct list_head
{
  struct list_head *prev;
};
extern void __wait_rcu_gp (void*);
const int a = sizeof 0;
static inline __attribute__ ((always_inline no_instrument_function)) void
rcu_barrier_sched (void)
{
  struct list_head b[a];
  __wait_rcu_gp (b);
}

static inline __attribute__ ((always_inline no_instrument_function)) void
rcu_barrier (void)
{
  rcu_barrier_sched ();
}

struct
{
  void *wait;
} c[] = { rcu_barrier, rcu_barrier_sched };

trippels@gcc2-power8 ~ % /home/trippels/gcc_5/usr/local/bin/gcc -c -O2 syn.i
syn.i: In function ‘rcu_barrier_sched’:
syn.i:8:1: internal compiler error: Segmentation fault
 rcu_barrier_sched (void)
 ^
0x107e9053 crash_signal
        ../../gcc/gcc/toplev.c:383
0x10937a64 tree_check
        ../../gcc/gcc/tree.h:2850
0x10937a64 fold_builtin_alloca_with_align
        ../../gcc/gcc/tree-ssa-ccp.c:2067
0x10937a64 ccp_fold_stmt
        ../../gcc/gcc/tree-ssa-ccp.c:2172
0x109d85a3
substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/gcc/tree-ssa-propagate.c:1177
0x10dd228b dom_walker::walk(basic_block_def*)
        ../../gcc/gcc/domwalk.c:188
0x109d7993 substitute_and_fold(tree_node* (*)(tree_node*), bool
(*)(gimple_stmt_iterator*), bool)
        ../../gcc/gcc/tree-ssa-propagate.c:1272
0x1092f0eb ccp_finalize
        ../../gcc/gcc/tree-ssa-ccp.c:941
0x1092f0eb do_ssa_ccp
        ../../gcc/gcc/tree-ssa-ccp.c:2382
0x1092f0eb execute
        ../../gcc/gcc/tree-ssa-ccp.c:2414
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-495576-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 25 07:41:12 2015
Return-Path: <gcc-bugs-return-495576-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 92182 invoked by alias); 25 Aug 2015 07:41:12 -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 92010 invoked by uid 48); 25 Aug 2015 07:41:08 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/67055] [5/6 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
Date: Tue, 25 Aug 2015 07:41:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.2.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-67055-4-5W3wwoC6Dc@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67055-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67055-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-08/txt/msg01718.txt.bz2
Content-length: 466

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ysato at users dot sourceforge.jp

--- Comment #12 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 67349 has been marked as a duplicate of this bug. ***


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

* [Bug tree-optimization/67055] [5 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (10 preceding siblings ...)
  2015-08-25  7:41 ` [Bug tree-optimization/67055] [5 " trippels at gcc dot gnu.org
@ 2015-09-10 15:51 ` trippels at gcc dot gnu.org
  2015-09-21  9:57 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-10 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Still happens on gcc-5 branch. 
(This breaks building the Linux kernel with -O3 with my config)
-fno-ipa-icf "fixes" the issue.


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

* [Bug tree-optimization/67055] [5 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (12 preceding siblings ...)
  2015-09-21  9:57 ` rguenth at gcc dot gnu.org
@ 2015-09-21  9:57 ` rguenth at gcc dot gnu.org
  2015-09-25  8:03 ` trippels at gcc dot gnu.org
  2015-10-17 10:08 ` ebotcazou at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-21  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to fail|                            |5.2.0

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

* [Bug tree-optimization/67055] [5 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (11 preceding siblings ...)
  2015-09-10 15:51 ` trippels at gcc dot gnu.org
@ 2015-09-21  9:57 ` rguenth at gcc dot gnu.org
  2015-09-21  9:57 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-21  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Sep 21 09:55:57 2015
New Revision: 227961

URL: https://gcc.gnu.org/viewcvs?rev=227961&root=gcc&view=rev
Log:
2015-09-21  Richard Biener  <rguenther@suse.de>

        Backport from mainline
        2015-07-08  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66793
        * gimple-ssa-isolate-paths.c
(insert_trap_and_remove_trailing_statemen):
        Properly split the block after stmts ending it.

        * gcc.dg/torture/pr66793.c: New testcase.

        2015-08-05  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67055
        * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Handle
        NULL gimple_block.

        * g++.dg/torture/pr67055.C: New testcase.

        2015-08-05  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67121
        * tree-if-conv.c (combine_blocks): Clear range-info produced
        by stmts no longer executed conditionally.

        * gcc.dg/torture/pr67121.c: New testcase.

        2015-09-16  Richard Biener  <rguenther@suse.de>

        PR middle-end/67271
        * fold-const.c (native_encode_expr): Bail out on bogus offsets.

        * gcc.dg/pr67271.c: New testcase.

        2015-07-22  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66952
        * tree-ssa-ifcombine.c (pass_tree_ifcombine::execute): For
        blocks we end up executing unconditionally reset all SSA
        info such as range and alignment.
        * tree-ssanames.h (reset_flow_sensitive_info): Declare.
        * tree-ssanames.c (reset_flow_sensitive_info): New function.

        * gcc.dg/torture/pr66952.c: New testcase.

        2015-09-15  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67470
        * tree-ssa-loop-im.c (execute_sm_if_changed): Preserve PHI
        structure for PHI hoisting by inserting a forwarder block
        if appropriate.

        * gcc.dg/torture/pr67470.c: New testcase.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr67055.C
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr67271.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66793.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66952.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr67121.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr67470.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/fold-const.c
    branches/gcc-5-branch/gcc/gimple-ssa-isolate-paths.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/tree-if-conv.c
    branches/gcc-5-branch/gcc/tree-ssa-ccp.c
    branches/gcc-5-branch/gcc/tree-ssa-ifcombine.c
    branches/gcc-5-branch/gcc/tree-ssa-loop-im.c
    branches/gcc-5-branch/gcc/tree-ssanames.c
    branches/gcc-5-branch/gcc/tree-ssanames.h


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

* [Bug tree-optimization/67055] [5 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (13 preceding siblings ...)
  2015-09-21  9:57 ` rguenth at gcc dot gnu.org
@ 2015-09-25  8:03 ` trippels at gcc dot gnu.org
  2015-10-17 10:08 ` ebotcazou at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-25  8:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nwmcsween at gmail dot com

--- Comment #17 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 67659 has been marked as a duplicate of this bug. ***


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

* [Bug tree-optimization/67055] [5 Regression] Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c
  2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
                   ` (14 preceding siblings ...)
  2015-09-25  8:03 ` trippels at gcc dot gnu.org
@ 2015-10-17 10:08 ` ebotcazou at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2015-10-17 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc-bugs at zahlenfresser dot de

--- Comment #18 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
*** Bug 67908 has been marked as a duplicate of this bug. ***


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

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

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-29 10:49 [Bug c++/67055] New: Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c balder@yahoo-inc.com
2015-07-29 11:08 ` [Bug c++/67055] " trippels at gcc dot gnu.org
2015-07-29 11:43 ` balder@yahoo-inc.com
2015-07-29 11:45 ` balder@yahoo-inc.com
2015-07-29 11:48 ` balder@yahoo-inc.com
2015-07-29 12:21 ` [Bug tree-optimization/67055] 5/6 Regression] " trippels at gcc dot gnu.org
2015-07-29 12:51 ` [Bug tree-optimization/67055] [5/6 " trippels at gcc dot gnu.org
2015-07-29 12:52 ` trippels at gcc dot gnu.org
2015-07-29 13:01 ` rguenth at gcc dot gnu.org
2015-08-05  4:24 ` hp at gcc dot gnu.org
2015-08-05  7:59 ` rguenth at gcc dot gnu.org
2015-08-25  7:41 ` [Bug tree-optimization/67055] [5 " trippels at gcc dot gnu.org
2015-09-10 15:51 ` trippels at gcc dot gnu.org
2015-09-21  9:57 ` rguenth at gcc dot gnu.org
2015-09-21  9:57 ` rguenth at gcc dot gnu.org
2015-09-25  8:03 ` trippels at gcc dot gnu.org
2015-10-17 10:08 ` ebotcazou 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).