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
This commit is contained in:
Joern Rennecke 2013-05-14 11:15:08 +00:00 committed by Denis Chertykov
parent d8478670ac
commit 6e022d7b0b
4 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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>
PR target/57261

View File

@ -8324,7 +8324,10 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
&& SYMBOL_REF == GET_CODE (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:
patch address space. */

View File

@ -1,3 +1,8 @@
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>
* gcc.dg/fstack-protector-strong.c (alloca): Declare.

View File

@ -52,4 +52,4 @@ LIM5 (X);
REFERENCE references[] = {
LIM5 (X)
0
};
}; /* { dg-error "size of array is too large" "" { target avr-*-* } } */