[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-12 Thread noring at nocrew dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

--- Comment #8 from Fredrik Noring  ---
Thanks, Mikael. Users evidently take whatever m68k-* GCC they have at hand and
so 68000-projects therefore must have a special configure test to verify that
-march=68000 isn't broken with the user's choice of GCC. I must say I do think
it's quite wrong to blame the user for this problem.

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-12 Thread mikpelinux at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

--- Comment #7 from Mikael Pettersson  ---
The correct target to use in this case is m68k-elf.

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-11 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

Andreas Schwab  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-11 Thread noring at nocrew dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

Fredrik Noring  changed:

   What|Removed |Added

 Resolution|INVALID |FIXED

--- Comment #6 from Fredrik Noring  ---
Then I would suggest it's a bug that GCC doesn't reject -march=68000
in combination with linux. Unsuspecting projects use this, and in fact
it almost works except for random crashes every now and then, which is
a grave quality problem to be sure.

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-11 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

Andreas Schwab  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

--- Comment #5 from Andreas Schwab  ---
Anything but linux.

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-11 Thread noring at nocrew dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

Fredrik Noring  changed:

   What|Removed |Added

 Resolution|INVALID |FIXED

--- Comment #4 from Fredrik Noring  ---
Well, GCC accepts -march=68000 as a valid option and so it doesn't seem to make
sense that it then proceeds to generate code for something incompatible like
the 68020. As far as I understand, other targets such as MIPS don't behave like
that: a MIPS III compiler can generate code for MIPS I without problems, for
instance.

What target(s) would you recommend for the compiler to (completely and without
exceptions) honour the given -march=68000 option?

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-11 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andreas Schwab  ---
m68k-linux requires m68020+, you cannot combine that with -march=68000.

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-11 Thread noring at nocrew dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

--- Comment #2 from Fredrik Noring  ---
To obtain the object file I can run the command

m68k-unknown-linux-gnu-gcc -O1 -march=68000 -c -o address-error.o
address-error.c

with a cross-compiler made using the Gentoo package sys-devel/crossdev having
the target m68k-unknown-linux-gnu.

[Bug c/98627] GCC emits unaligned memory access instructions causing address error exceptions with the 68000 architecture

2021-01-11 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98627

--- Comment #1 from Andreas Schwab  ---
How did you configure the compiler?