[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-23 Thread martin at netbsd dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

Martin Husemann martin at netbsd dot org changed:

   What|Removed |Added

 CC||martin at netbsd dot org

--- Comment #8 from Martin Husemann martin at netbsd dot org ---
(In reply to Andreas Schwab from comment #7)
 If you have fundamental types with stricter alignment requirements than
 provided by STACK_BOUNDARY your ABI has a problem, and this SSP failure is
 just one symptom.

Why is that a fundamental problem? It is not that different to i386 and data
used for MMX/SSE instructions - not nice, but the compiler should be able to
cope.


[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-04 Thread mikpelinux at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

--- Comment #1 from Mikael Pettersson mikpelinux at gmail dot com ---
Works, as in generates OK looking code w/o issuing any diagnostics, on both
m68k-linux and vax-linux for me.  A NetBSD issue?


[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-04 Thread christos at zoulas dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

--- Comment #2 from Christos Zoulas christos at zoulas dot com ---
On Jan 4, 11:20am, gcc-bugzi...@gcc.gnu.org (mikpelinux at gmail dot com)
wrote:
-- Subject: [Bug c/59674] On m68k and vax variables stack variables with  MA

| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674
| 
| --- Comment #1 from Mikael Pettersson mikpelinux at gmail dot com ---
| Works, as in generates OK looking code w/o issuing any diagnostics, on both
| m68k-linux and vax-linux for me.  A NetBSD issue?

Are you using a native compiler or a cross-compiler? We are using a cross
compiler from amd64.

christos


[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-04 Thread mikpelinux at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

--- Comment #3 from Mikael Pettersson mikpelinux at gmail dot com ---
I tested both targets with cross compilers from x86_64-linux.  I also tested
natively on m68k-linux.


[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-04 Thread christos at zoulas dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

--- Comment #4 from Christos Zoulas christos at zoulas dot com ---
On Jan 4,  5:22pm, gcc-bugzi...@gcc.gnu.org (mikpelinux at gmail dot com)
wrote:
-- Subject: [Bug c/59674] On m68k and vax variables stack variables with  MA

| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674
| 
| --- Comment #3 from Mikael Pettersson mikpelinux at gmail dot com ---
| I tested both targets with cross compilers from x86_64-linux.  I also tested
| natively on m68k-linux.

My guess is that m68k-linux is not using the SVR4 ABI, i.e. it does not
require long long and double to be aligned on a doubleword boundary.

From the comment in netbsd-elf.h:

/* No data type wants to be aligned rounder than this.
   For m68k/SVR4, some types (doubles for example) are aligned on 8 byte
   boundaries */

#undef BIGGEST_ALIGNMENT
#define BIGGEST_ALIGNMENT 64

christos


[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-04 Thread mikpelinux at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

--- Comment #5 from Mikael Pettersson mikpelinux at gmail dot com ---
(In reply to Christos Zoulas from comment #4)
 My guess is that m68k-linux is not using the SVR4 ABI, i.e. it does not
 require long long and double to be aligned on a doubleword boundary.

That is correct, m68k-linux has looser alignment rules than most other archs. 
Which is why I also tested vax-linux, hoping that its ABI would be more in line
with other VAX targets.


[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-04 Thread christos at zoulas dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

--- Comment #6 from Christos Zoulas christos at zoulas dot com ---
On Jan 4,  8:42pm, gcc-bugzi...@gcc.gnu.org (mikpelinux at gmail dot com)
wrote:
-- Subject: [Bug c/59674] On m68k and vax variables stack variables with  MA

| That is correct, m68k-linux has looser alignment rules than most other archs. 
| Which is why I also tested vax-linux, hoping that its ABI would be more in
line
| with other VAX targets.

We have the same problem with sh3 also. I think that the VAX issue is
a bit different. I will test and provide more details for both platforms.

christos


[Bug c/59674] On m68k and vax variables stack variables with MAX_STACK_ALIGNMENT make ssp fail

2014-01-04 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59674

--- Comment #7 from Andreas Schwab sch...@linux-m68k.org ---
If you have fundamental types with stricter alignment requirements than
provided by STACK_BOUNDARY your ABI has a problem, and this SSP failure is just
one symptom.