From 81d19c06fce464caf522047c2b47aa8cc8dad243 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 15 May 2008 12:44:42 +0000 Subject: [PATCH] re PR middle-end/36244 (-ftree-parallelize-loops=4, vectorizer enabled, ICE) 2008-05-15 Richard Guenther PR middle-end/36244 * tree-ssa-alias.c (new_type_alias): Do not set TREE_READONLY. * tree-flow-inline.h (unmodifiable_var_p): Memory tags never represent unmodifiable vars. * gcc.dg/torture/pr36244.c: New testcase. From-SVN: r135336 --- gcc/ChangeLog | 7 +++++ gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.dg/torture/pr36244.c | 39 ++++++++++++++++++++++++++ gcc/tree-flow-inline.h | 2 +- gcc/tree-ssa-alias.c | 1 - 5 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr36244.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a91ab4ea90..d30ef0ffc44 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-05-15 Richard Guenther + + PR middle-end/36244 + * tree-ssa-alias.c (new_type_alias): Do not set TREE_READONLY. + * tree-flow-inline.h (unmodifiable_var_p): Memory tags never + represent unmodifiable vars. + 2008-05-15 Richard Guenther * tree-dfa.c (refs_may_alias_p): Allow all kinds of diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 10769c8b2c3..56493e03fdd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-15 Richard Guenther + + PR middle-end/36244 + * gcc.dg/torture/pr36244.c: New testcase. + 2008-05-15 Eric Botcazou * gnat.dg/discr8.ad[sb]: New test. diff --git a/gcc/testsuite/gcc.dg/torture/pr36244.c b/gcc/testsuite/gcc.dg/torture/pr36244.c new file mode 100644 index 00000000000..9daa29e2f10 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr36244.c @@ -0,0 +1,39 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -ftree-parallelize-loops=4" } */ + +struct p7prior_s { + int mnum; /* number of mat emission Dirichlet mixtures */ + float mq[200]; /* probabilities of mnum components */ + float m[200][20]; /* match emission terms per mix component */ +}; + +struct p7prior_s *default_amino_prior(void); +struct p7prior_s *P7AllocPrior(void); + +struct p7prior_s * +default_amino_prior(void) +{ + struct p7prior_s *pri; + int x, q; + + static float defmq[5] = { + 0.178091, 0.056591, 0.0960191, 0.0781233, 0.0834977 }; + static float defm[5][6] = { + { 0.270671, 0.039848, 0.017576, 0.016415, 0.014268, 0.216147 }, + { 0.021465, 0.010300, 0.011741, 0.010883, 0.385651, 0.029156 }, + { 0.561459, 0.045448, 0.438366, 0.764167, 0.087364, 0.583402 }, + { 0.070143, 0.011140, 0.019479, 0.094657, 0.013162, 0.073732 }, + { 0.041103, 0.014794, 0.005610, 0.010216, 0.153602, 0.012049 } + }; + + pri = P7AllocPrior(); + pri->mnum = 5; + for (q = 0; q < pri->mnum; q++) + { + pri->mq[q] = defmq[q]; + for (x = 0; x < 6; x++) + pri->m[q][x] = defm[q][x]; + } + return pri; +} + diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index a4fe9c29c22..9e8edc6bed1 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -1545,7 +1545,7 @@ unmodifiable_var_p (const_tree var) var = SSA_NAME_VAR (var); if (MTAG_P (var)) - return TREE_READONLY (var) && (TREE_STATIC (var) || MTAG_GLOBAL (var)); + return false; return TREE_READONLY (var) && (TREE_STATIC (var) || DECL_EXTERNAL (var)); } diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index a054329e8d4..431f05aff97 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -3436,7 +3436,6 @@ new_type_alias (tree ptr, tree var, tree expr) ali = add_may_alias_for_new_tag (tag, var); set_symbol_mem_tag (ptr, ali); - TREE_READONLY (tag) = TREE_READONLY (var); MTAG_GLOBAL (tag) = is_global_var (var); } -- 2.30.2