From b58a864da35143bcacd42ba99846886213fdf78c Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Wed, 17 Nov 2010 01:41:13 +0000 Subject: [PATCH] re PR target/46512 (crtstuff.c:563:1: internal compiler error: Segmentation fault) PR target/46512 * config/pa/pa.c (pa_function_arg_boundary): Move TYPE_SIZE accesses under check for type. From-SVN: r166849 --- gcc/ChangeLog | 6 ++++++ gcc/config/pa/pa.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f5a5a3..4b8c9a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-11-16 Nathan Froyd + + PR target/46512 + * config/pa/pa.c (pa_function_arg_boundary): Move TYPE_SIZE accesses + under check for type. + 2010-11-16 Eric Botcazou * ifcvt.c (dead_or_predicable): Fix typo. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 366ce01..57858a7 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -9608,10 +9608,9 @@ pa_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, static unsigned int pa_function_arg_boundary (enum machine_mode mode, const_tree type) { - tree size = TYPE_SIZE (type); bool singleword = (type - ? (integer_zerop (size) - || !TREE_CONSTANT (size) + ? (integer_zerop (TYPE_SIZE (type)) + || !TREE_CONSTANT (TYPE_SIZE (type)) || int_size_in_bytes (type) <= UNITS_PER_WORD) : GET_MODE_SIZE (mode) <= UNITS_PER_WORD); -- 2.7.4