This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Fix fallout from removing BIND_EXPR nodes
- From: Steven Bosscher <steven at gcc dot gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Nov 2003 20:00:46 +0100
- Subject: [tree-ssa] Fix fallout from removing BIND_EXPR nodes
- Organization: SUSE Labs
Hi,
Since we started lowering GIMPLE and removing BIND_EXPRs, we've had these new
failures:
FAIL: gcc.dg/noncompile/920507-1.c (test for errors, line 4)
FAIL: gcc.dg/noncompile/920507-1.c (test for excess errors)
FAIL: gcc.dg/noncompile/920507-1.c (test for errors, line 4)
FAIL: gcc.dg/noncompile/920507-1.c (test for excess errors)
FAIL: gcc.dg/noncompile/920507-1.c (test for errors, line 4)
FAIL: gcc.dg/noncompile/920507-1.c (test for excess errors)
FAIL: gcc.dg/noncompile/920507-1.c (test for errors, line 4)
FAIL: gcc.dg/noncompile/920507-1.c (test for excess errors)
FAIL: gcc.dg/noncompile/920507-1.c (test for errors, line 4)
FAIL: gcc.dg/noncompile/920507-1.c (test for excess errors)
FAIL: gcc.dg/noncompile/920507-1.c (test for errors, line 4)
FAIL: gcc.dg/noncompile/920507-1.c (test for excess errors
This seems to have only worked by accident previously, the location for the
error message was probably extracted from the BIND_EXPR that contained the
declaration.
The attached patch should fix these FAILs once and for all. Bootstrapped on
i686-pc-linux-gnu, testing in progress, OK if it passes?
Gr.
Steven
2003-11-10 Steven Bosscher <stevenb@suse.de>
* toplev.c (rest_of_decl_compilation): Use the location of the declaration
for error messages.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.654.2.72
diff -c -3 -p -r1.654.2.72 toplev.c
*** toplev.c 28 Oct 2003 14:56:21 -0000 1.654.2.72
--- toplev.c 10 Nov 2003 18:54:38 -0000
*************** rest_of_decl_compilation (tree decl,
*** 2017,2023 ****
}
else
{
! error ("invalid register name `%s' for register variable", asmspec);
DECL_REGISTER (decl) = 0;
if (!top_level)
expand_decl (decl);
--- 2017,2024 ----
}
else
{
! error ("%Hinvalid register name `%s' for register variable",
! &DECL_SOURCE_LOCATION (decl), asmspec);
DECL_REGISTER (decl) = 0;
if (!top_level)
expand_decl (decl);