This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47638] New: sanity check error message is wrong in expand_one_var
- From: "adam.rak at streamnovation dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 8 Feb 2011 00:15:12 +0000
- Subject: [Bug middle-end/47638] New: sanity check error message is wrong in expand_one_var
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47638
Summary: sanity check error message is wrong in expand_one_var
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: adam.rak@streamnovation.com
in cfgexpand.c expand_one_var can give an error message like:
"error: size of variable âvarâ is too large"
which is very wrong and misleading if DECL_SIZE(var) is actually =0
I modified the line like this:
error ("size of variable %q+D is too large, size: %i", var,
DECL_SIZE_UNIT(var));
and got:
error: size of variable âvarâ is too large, size: 0
DECL_SIZE(var) = 0 can happen when the type layout is missing.
the fix is obvious, we need another error message for this case.