2013-11-28 Richard Biener <rguenther@suse.de>
PR lto/59323
* lto-streamer-out.c (tree_is_indexable): TYPE_DECLs and
CONST_DECLs in function context are not indexable.
* gcc.dg/lto/pr59323_0.c: New testcase.
From-SVN: r205481
+2013-11-28 Richard Biener <rguenther@suse.de>
+
+ PR lto/59323
+ * lto-streamer-out.c (tree_is_indexable): TYPE_DECLs and
+ CONST_DECLs in function context are not indexable.
+
2013-11-28 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_rtx_costs): Adjust MULT cost if it is
definition. */
if (TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL)
return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE);
- else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t)
- && !TREE_STATIC (t))
+ else if (((TREE_CODE (t) == VAR_DECL && !TREE_STATIC (t))
+ || TREE_CODE (t) == TYPE_DECL
+ || TREE_CODE (t) == CONST_DECL)
+ && decl_function_context (t))
return false;
else if (TREE_CODE (t) == DEBUG_EXPR_DECL)
return false;
+2013-11-28 Richard Biener <rguenther@suse.de>
+
+ PR lto/59323
+ * gcc.dg/lto/pr59323_0.c: New testcase.
+
2013-11-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/57393
--- /dev/null
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O2 -g -flto } } } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+extern void bar(void);
+
+int main(int argc, char **argv)
+{
+ int i;
+
+ if (argc == 1) {
+ enum { X };
+
+ bar();
+
+ {
+ enum { X };
+
+ asm goto ("" : : : : lab);
+lab:
+ ;
+ }
+ }
+
+ {
+ enum { X };
+
+ int foo(void)
+ {
+ return argv[0][0];
+ }
+
+ i = foo();
+ }
+
+ return i;
+}