Bug 47955 - gcc.dg/stack-usage-1.c fails on m68k-linux
Summary: gcc.dg/stack-usage-1.c fails on m68k-linux
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-02 13:44 UTC by Mikael Pettersson
Modified: 2011-05-02 17:01 UTC (History)
0 users

See Also:
Host:
Target: m68k-linux
Build:
Known to work:
Known to fail: 4.6.0
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Pettersson 2011-03-02 13:44:36 UTC
The gcc.dg/stack-usage-1.c test case fails on m68k-linux:

> fgrep stack-usage- gcc/testsuite/gcc/gcc.log 
Executing on host: /mnt/scratch/objdir46/gcc/xgcc -B/mnt/scratch/objdir46/gcc/ /mnt/scratch/gcc-4.6-20110226/gcc/testsuite/gcc.dg/stack-usage-1.c   -fstack-usage -S  -o stack-usage-1.s    (timeout = 300)
/mnt/scratch/gcc-4.6-20110226/gcc/testsuite/gcc.dg/stack-usage-1.c: In function 'foo':
/mnt/scratch/gcc-4.6-20110226/gcc/testsuite/gcc.dg/stack-usage-1.c:53:1: warning: -fstack-usage not supported for this target [enabled by default]
/mnt/scratch/gcc-4.6-20110226/gcc/testsuite/gcc.dg/stack-usage-1.c: In function 'foo':
/mnt/scratch/gcc-4.6-20110226/gcc/testsuite/gcc.dg/stack-usage-1.c:53:1: warning: -fstack-usage not supported for this target [enabled by default]
FAIL: gcc.dg/stack-usage-1.c (test for excess errors)
/mnt/scratch/gcc-4.6-20110226/gcc/testsuite/gcc.dg/stack-usage-1.c:53:1: warning: -fstack-usage not supported for this target [enabled by default]
FAIL: gcc.dg/stack-usage-1.c scan-file foo\t(256|264)\tstatic

The issue is that the m68k backend doesn't set stack usage data, which generic parts detect and report as "-fstack-usage not supported".

m68k_expand_prologue() should update current_function_static_stack_size if flag_stack_usage is set.
Comment 1 Andreas Schwab 2011-05-02 16:58:36 UTC
Author: schwab
Date: Mon May  2 16:58:32 2011
New Revision: 173260

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173260
Log:
PR target/47955
* gcc/config/m68k/m68k.c (m68k_expand_prologue): Set
current_function_static_stack_size.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/m68k/m68k.c
Comment 2 Andreas Schwab 2011-05-02 17:01:46 UTC
Fixed in 4.7.