Commit 6e022d7b by Joern Rennecke Committed by Denis Chertykov

avr.c (avr_encode_section_info): Bail out if the type is error_mark_node.

gcc:
        * config/avr/avr.c (avr_encode_section_info): Bail out if the type
        is error_mark_node.
gcc/testsuite:
        * testsuite/gcc.c-torture/compile/limits-externdecl.c [target avr-*-*]:
        Expect "size of array is too large" error.

From-SVN: r198876
parent d8478670
2013-05-14 Joern Rennecke <joern.rennecke@embecosm.com>
* config/avr/avr.c (avr_encode_section_info): Bail out if the type
is error_mark_node.
2013-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2013-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/57261 PR target/57261
......
...@@ -8324,7 +8324,10 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p) ...@@ -8324,7 +8324,10 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
&& SYMBOL_REF == GET_CODE (XEXP (rtl, 0))) && SYMBOL_REF == GET_CODE (XEXP (rtl, 0)))
{ {
rtx sym = XEXP (rtl, 0); rtx sym = XEXP (rtl, 0);
addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (decl)); tree type = TREE_TYPE (decl);
if (type == error_mark_node)
return;
addr_space_t as = TYPE_ADDR_SPACE (type);
/* PSTR strings are in generic space but located in flash: /* PSTR strings are in generic space but located in flash:
patch address space. */ patch address space. */
......
2013-05-14 Joern Rennecke <joern.rennecke@embecosm.com>
* testsuite/gcc.c-torture/compile/limits-externdecl.c [target avr-*-*]:
Expect "size of array is too large" error.
2013-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2013-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc.dg/fstack-protector-strong.c (alloca): Declare. * gcc.dg/fstack-protector-strong.c (alloca): Declare.
......
...@@ -52,4 +52,4 @@ LIM5 (X); ...@@ -52,4 +52,4 @@ LIM5 (X);
REFERENCE references[] = { REFERENCE references[] = {
LIM5 (X) LIM5 (X)
0 0
}; }; /* { dg-error "size of array is too large" "" { target avr-*-* } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment