Commit ce2fb245 by Richard Stallman

(make_decl_rtl): Print an error for explicit register variable

whose type cannot be stored in that register.

From-SVN: r3561
parent e0c72e78
......@@ -333,6 +333,9 @@ make_decl_rtl (decl, asmspec, top_level)
error ("function declared `register'");
else if (DECL_REGISTER (decl) && TYPE_MODE (TREE_TYPE (decl)) == BLKmode)
error_with_decl (decl, "data type of `%s' isn't suitable for a register");
else if (DECL_REGISTER (decl)
&& ! HARD_REGNO_MODE_OK (reg_number, TYPE_MODE (TREE_TYPE (decl))))
error_with_decl (decl, "register number for `%s' isn't suitable for the data type");
/* Now handle properly declared static register variables. */
else if (DECL_REGISTER (decl))
{
......
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