Commit 547fba7e by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/67452 (LTO ICE with -fopenmp-simd)

	PR middle-end/67452
	* tree-ssa-live.c: Include cfgloop.h.
	(remove_unused_locals): Clear loop->simduid if simduid is about
	to be removed from cfun->local_decls.

	* gcc.dg/lto/pr67452_0.c: New test.

From-SVN: r227498
parent b52ec220
2015-09-04 Jakub Jelinek <jakub@redhat.com>
PR middle-end/67452
* tree-ssa-live.c: Include cfgloop.h.
(remove_unused_locals): Clear loop->simduid if simduid is about
to be removed from cfun->local_decls.
2015-09-02 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
PR target/65210
......
2015-09-04 Jakub Jelinek <jakub@redhat.com>
PR middle-end/67452
* gcc.dg/lto/pr67452_0.c: New test.
2015-09-02 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
PR target/65210
......
/* { dg-lto-do link } */
/* { dg-lto-options { { -O2 -flto -fopenmp-simd } } } */
float b[3][3];
__attribute__((used, noinline)) void
foo ()
{
int v1, v2;
#pragma omp simd collapse(2)
for (v1 = 0; v1 < 3; v1++)
for (v2 = 0; v2 < 3; v2++)
b[v1][v2] = 2.5;
}
int
main ()
{
asm volatile ("" : : "g" (b) : "memory");
foo ();
asm volatile ("" : : "g" (b) : "memory");
return 0;
}
......@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa.h"
#include "cgraph.h"
#include "ipa-utils.h"
#include "cfgloop.h"
#ifdef ENABLE_CHECKING
static void verify_live_on_entry (tree_live_info_p);
......@@ -820,6 +821,14 @@ remove_unused_locals (void)
}
}
if (cfun->has_simduid_loops)
{
struct loop *loop;
FOR_EACH_LOOP (loop, 0)
if (loop->simduid && !is_used_p (loop->simduid))
loop->simduid = NULL_TREE;
}
cfun->has_local_explicit_reg_vars = false;
/* Remove unmarked local and global vars from local_decls. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment