Commit dc197ab9 by Volker Reichelt

re PR c/35436 (ICE with attribute "format")

	PR c/35436
	* c-format.c (init_dynamic_gfc_info): Ignore invalid locus type.

	* gcc.dg/format/gcc_gfc-2.c: New test.

From-SVN: r133800
parent 9e9b5341
2008-04-01 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35436
* c-format.c (init_dynamic_gfc_info): Ignore invalid locus type.
2008-04-02 Ben Elliston <bje@au.ibm.com> 2008-04-02 Ben Elliston <bje@au.ibm.com>
* config/v850/v850.md (casesi): Remove if (0) code. * config/v850/v850.md (casesi): Remove if (0) code.
......
...@@ -2474,7 +2474,8 @@ init_dynamic_gfc_info (void) ...@@ -2474,7 +2474,8 @@ init_dynamic_gfc_info (void)
locus = identifier_global_value (locus); locus = identifier_global_value (locus);
if (locus) if (locus)
{ {
if (TREE_CODE (locus) != TYPE_DECL) if (TREE_CODE (locus) != TYPE_DECL
|| TREE_TYPE (locus) == error_mark_node)
{ {
error ("%<locus%> is not defined as a type"); error ("%<locus%> is not defined as a type");
locus = 0; locus = 0;
......
2008-04-01 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35436
* gcc.dg/format/gcc_gfc-2.c: New test.
2008-03-31 Seongbae Park <seongbae.park@gmail.com> 2008-03-31 Seongbae Park <seongbae.park@gmail.com>
* g++.db/bprob/bprob.exp: Do not check gcno files. * g++.dg/bprob/bprob.exp: Do not check gcno files.
Use -fprofile-use for profile use. Use -fprofile-use for profile use.
* gcc.misc-tests/bprob.exp: Ditto. * gcc.misc-tests/bprob.exp: Ditto.
* g++.dg/tree-pro/tree-prof.exp: Do not check gcno files. * g++.dg/tree-pro/tree-prof.exp: Do not check gcno files.
/* PR c/35436 */
/* { dg-do compile } */
/* { dg-options "-Wformat" } */
typedef void locus[1]; /* { dg-error "array of void" } */
void foo(const char*, ...)
__attribute__((__format__(__gcc_gfc__, 1, 2))); /* { dg-error "locus" } */
void bar()
{
foo("%L", 0); /* { dg-warning "format" } */
}
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