aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-11-10 17:44:46 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-11-10 17:44:46 +0000
commit666955711fcfd86667ff80cf76fcee9bf6fee606 (patch)
tree26a6783c17f70f5f059a7c18769193e9410c6598 /gcc
parent6692a053e274798edc26345f400f5b032ee08194 (diff)
downloadgcc-666955711fcfd86667ff80cf76fcee9bf6fee606.zip
gcc-666955711fcfd86667ff80cf76fcee9bf6fee606.tar.gz
gcc-666955711fcfd86667ff80cf76fcee9bf6fee606.tar.bz2
sparc.c (print_operand): Test for a non-null DECL_SIZE of DECL_RESULT before evaluating it.
* config/sparc/sparc.c (print_operand) <')'>: Test for a non-null DECL_SIZE of DECL_RESULT before evaluating it. From-SVN: r154068
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sparc/sparc.c22
2 files changed, 16 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 93c86bb..c8902ee 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/sparc/sparc.c (print_operand) <')'>: Test for a non-null
+ DECL_SIZE of DECL_RESULT before evaluating it.
+
2009-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
PR tree-optimization/41987
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 0bfde6f..75bb2dd 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -6958,19 +6958,19 @@ print_operand (FILE *file, rtx x, int code)
/* Output the right displacement from the saved PC on function return.
The caller may have placed an "unimp" insn immediately after the call
so we have to account for it. This insn is used in the 32-bit ABI
- when calling a function that returns a non zero-sized structure. The
+ when calling a function that returns a non zero-sized structure. The
64-bit ABI doesn't have it. Be careful to have this test be the same
- as that used on the call. The exception here is that when
- sparc_std_struct_return is enabled, the psABI is followed exactly
- and the adjustment is made by the code in sparc_struct_value_rtx.
- The call emitted is the same when sparc_std_struct_return is
- present. */
- if (! TARGET_ARCH64
+ as that for the call. The exception is when sparc_std_struct_return
+ is enabled, the psABI is followed exactly and the adjustment is made
+ by the code in sparc_struct_value_rtx. The call emitted is the same
+ when sparc_std_struct_return is enabled. */
+ if (!TARGET_ARCH64
&& cfun->returns_struct
- && ! sparc_std_struct_return
- && (TREE_CODE (DECL_SIZE (DECL_RESULT (current_function_decl)))
- == INTEGER_CST)
- && ! integer_zerop (DECL_SIZE (DECL_RESULT (current_function_decl))))
+ && !sparc_std_struct_return
+ && DECL_SIZE (DECL_RESULT (current_function_decl))
+ && TREE_CODE (DECL_SIZE (DECL_RESULT (current_function_decl)))
+ == INTEGER_CST
+ && !integer_zerop (DECL_SIZE (DECL_RESULT (current_function_decl))))
fputs ("12", file);
else
fputc ('8', file);