Lev Yudalevich wrote:
Hi,
I asked this question about a month ago at gcc-help, but got no answer, so...
Well you are always depending on volunteer help when you send in
a question like this, so if no one feels like answering, you
won't get an answer. Nothing very unusual there.
I'm trying to define a nonstandard type for 12-bit scalar variables
based on a target-dependent PSI mode.
In my TARGET-modes.def file I have PARTIAL_MODE_INT(SI) defined.
During the backend's init_builtins processing I do the following:
tree t = make_unsigned_type (12);
(*lang_hooks.types.register_builtin_type) (t, "mybit12_t");
SET_TYPE_MODE (PSImode);
However, when the resulting gcc compiler crashes (ICE) when it tries
to convert any integer into my new type.
Plase report the specific crash as a bug report with full details,
in particular a full compilable example that shows the ICE. Obviously
gcc should never crash, no matter whether your code is right or wrong.
I would really appreciate any help on this problem and even general
guidance on how to properly define the PSI mode for scalar data (all
ports I'm aware of use the PSImode for pointers, and not scalars).
PARTIAL_MODE_INT seems to be kind of undocumented feature. Can anybody
suggest the steps required to use it properly?
General help questions belong on gcc-help, this mailing list is for
gcc development.