This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/47638] New: sanity check error message is wrong in expand_one_var


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]