From f6fee35fb2e964a7595711890637c2243535f60c Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 23 Jan 2013 11:24:54 -0500 Subject: [PATCH] rs6000.c (rs6000_delegitimize_address): Check that TOC operand is a valid symbol ref in the constant pool. * config/rs6000/rs6000.c (rs6000_delegitimize_address): Check that TOC operand is a valid symbol ref in the constant pool. From-SVN: r195409 --- gcc/ChangeLog | 7 ++++++- gcc/config/rs6000/rs6000.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a90ec6ef1ff..b511b15e4dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,9 @@ -2013-01-23 Edgar E. Iglesias +2013-01-23 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_delegitimize_address): Check that + TOC operand is a valid symbol ref in the constant pool. + +2013-01-23 Edgar E. Iglesias * gcc/config/microblaze/linux.h: Add TARGET_OS_CPP_BUILTINS diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 46bb0b437c3..76d7f3da613 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5831,6 +5831,8 @@ rs6000_delegitimize_address (rtx orig_x) /* Do not associate thread-local symbols with the original constant pool symbol. */ if (TARGET_XCOFF + && GET_CODE (y) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (y) && SYMBOL_REF_TLS_MODEL (get_pool_constant (y)) >= TLS_MODEL_REAL) return orig_x; #endif -- 2.30.2