https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77600

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |law at redhat dot com
         Resolution|---                         |INVALID

--- Comment #2 from Jeffrey A. Law <law at redhat dot com> ---
This is a similar issue as I outlined in the other m68k -mshort BZ.  This time
we need to look at how INTPTR_TYPE, which is defined in terms of
LONG_TYPE_SIZE.   When LONG_TYPE_SIZE == 32, INTPTR_TYPE will be an "int"
-mshort changes the size of an int from 32 to 16 bits.

Thus conversions to/from sizetype are going to do things you don't expect
unless you know sizetype is 16 bits.

Again, if you configure for a bare metal target such as m68k-elf or avoid using
-mshort on your linux target, you'll get the desired and expected result.

Reply via email to