mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/67055 (Segmentation fault in fold_builtin_alloca_with_align in tree-ssa-ccp.c)
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. From-SVN: r226616
This commit is contained in:
parent
f4904740e7
commit
cd583fe180
|
|
@ -1,3 +1,11 @@
|
||||||
|
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 Kirill Yukhin <kirill.yukhin@intel.com>
|
2015-08-05 Kirill Yukhin <kirill.yukhin@intel.com>
|
||||||
|
|
||||||
* config/i386/i386.md (define_attr "isa"): Addd avx512vl and
|
* config/i386/i386.md (define_attr "isa"): Addd avx512vl and
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-08-05 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/67055
|
||||||
|
* g++.dg/torture/pr67055.C: New testcase.
|
||||||
|
|
||||||
2015-08-05 Richard Biener <rguenther@suse.de>
|
2015-08-05 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/67109
|
PR tree-optimization/67109
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-additional-options "-std=c++14" }
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
typedef __SIZE_TYPE__ 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);
|
||||||
|
}
|
||||||
|
|
@ -2107,6 +2107,7 @@ fold_builtin_alloca_with_align (gimple stmt)
|
||||||
as a declared array, so we allow a larger size. */
|
as a declared array, so we allow a larger size. */
|
||||||
block = gimple_block (stmt);
|
block = gimple_block (stmt);
|
||||||
if (!(cfun->after_inlining
|
if (!(cfun->after_inlining
|
||||||
|
&& block
|
||||||
&& TREE_CODE (BLOCK_SUPERCONTEXT (block)) == FUNCTION_DECL))
|
&& TREE_CODE (BLOCK_SUPERCONTEXT (block)) == FUNCTION_DECL))
|
||||||
threshold /= 10;
|
threshold /= 10;
|
||||||
if (size > threshold)
|
if (size > threshold)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue