This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/54515] cc1plus sigsegv -O2 anonymous namespace


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54515

--- Comment #6 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-09-07 15:23:04 UTC ---
The following patch fixes the issue for me:

diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index aafaa15..2bb92e9 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -984,7 +984,8 @@ static void
 disqualify_base_of_expr (tree t, const char *reason)
 {
   t = get_base_address (t);
-  if (sra_mode == SRA_MODE_EARLY_IPA
+  if (t
+      && sra_mode == SRA_MODE_EARLY_IPA
       && TREE_CODE (t) == MEM_REF)
     t = get_ssa_base_param (TREE_OPERAND (t, 0));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]