public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
@ 2012-06-09 22:58 bluecrab2887 at netscape dot net
2012-06-10 2:29 ` [Bug target/53621] " lsebald1 at umbc dot edu
` (23 more replies)
0 siblings, 24 replies; 25+ messages in thread
From: bluecrab2887 at netscape dot net @ 2012-06-09 22:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
Bug #: 53621
Summary: [SH] Frame pointers not generated with
-fno-omit-frame-pointer on GCC 4.7.0
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: bluecrab2887@netscape.net
With GCC 4.7.0, frame pointers do not seem to be generated when compiling with
-fno-omit-frame-pointer in a sh-elf targeted GCC.
Compiling the following piece of code generates the same assembly, regardless
of whether -fomit-frame-pointer or -fno-omit-frame-pointer is given:
__attribute__((noinline)) int sum3(int x, int y, int z) {
return x + y + z;
}
int main(int argc, char *argv[]) {
return sum3(1, 2, 3);
}
The code generated is as follows with GCC 4.7.0:
.file "test13.c"
.text
.little
.section .text.sum3,"ax",@progbits
.align 1
.align 5
.global _sum3
.type _sum3, @function
_sum3:
mov r4,r0
add r5,r0
rts
add r6,r0
.size _sum3, .-_sum3
.section .text.startup.main,"ax",@progbits
.align 1
.align 5
.global _main
.type _main, @function
_main:
mov.l .L3,r0
mov #1,r4
mov #2,r5
jmp @r0
mov #3,r6
.L4:
.align 2
.L3:
.long _sum3
.size _main, .-_main
.ident "GCC: (GNU) 4.7.0"
With GCC 4.5.2, essentially identical code is generated for when using
-fomit-frame-pointer. However, with -fno-omit-frame-pointer, frame pointers are
generated as expected:
.file "testcase.c"
.text
.little
.text
.align 1
.align 5
.global _sum3
.type _sum3, @function
_sum3:
mov r5,r0
add r4,r0
mov.l r14,@-r15
add r6,r0
mov r15,r14
mov r14,r15
rts
mov.l @r15+,r14
.size _sum3, .-_sum3
.align 1
.align 5
.global _main
.type _main, @function
_main:
mov.l .L3,r0
mov #1,r4
mov.l r14,@-r15
mov #2,r5
mov #3,r6
mov r15,r14
mov r14,r15
jmp @r0
mov.l @r15+,r14
.L4:
.align 2
.L3:
.long _sum3
.size _main, .-_main
.ident "GCC: (GNU) 4.5.2"
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
@ 2012-06-10 2:29 ` lsebald1 at umbc dot edu
2012-06-10 19:13 ` olegendo at gcc dot gnu.org
` (22 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: lsebald1 at umbc dot edu @ 2012-06-10 2:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #1 from Lawrence Sebald <lsebald1 at umbc dot edu> 2012-06-10 02:29:40 UTC ---
Created attachment 27594
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27594
Remove line forcing -fomit-frame-pointer on sh-elf.
The problem seems to boil down to line 750 of gcc/config/sh/sh.c (in
sh_option_override), which sets flag_omit_frame_pointer to non-zero if the
preferred debugging format is dwarf2 (which it is on sh-elf). It doesn't seem
that any other targets (that I noticed) do anything similar, so it does seem a
bit out of place to do so.
Removing that line (as the attached patch does) makes it so that
-fno-omit-frame-pointer works as expected.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
2012-06-10 2:29 ` [Bug target/53621] " lsebald1 at umbc dot edu
@ 2012-06-10 19:13 ` olegendo at gcc dot gnu.org
2012-06-10 22:25 ` lsebald1 at umbc dot edu
` (21 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-06-10 19:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-06-10
CC| |kkojima at gcc dot gnu.org,
| |olegendo at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-06-10 19:13:44 UTC ---
(In reply to comment #1)
> Created attachment 27594 [details]
> Remove line forcing -fomit-frame-pointer on sh-elf.
>
> The problem seems to boil down to line 750 of gcc/config/sh/sh.c (in
> sh_option_override), which sets flag_omit_frame_pointer to non-zero if the
> preferred debugging format is dwarf2 (which it is on sh-elf). It doesn't seem
> that any other targets (that I noticed) do anything similar, so it does seem a
> bit out of place to do so.
>
> Removing that line (as the attached patch does) makes it so that
> -fno-omit-frame-pointer works as expected.
This line is related to PR 29996 and was introduced in this patch
http://gcc.gnu.org/ml/gcc-patches/2010-01/msg01147.html
I'm not sure whether removing it won't introduce some other side effects.
Maybe it should have been something like this instead?
flag_omit_frame_pointer = flag_omit_frame_pointer
&& (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);
I'd like to add Kaz to the CC list.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
2012-06-10 2:29 ` [Bug target/53621] " lsebald1 at umbc dot edu
2012-06-10 19:13 ` olegendo at gcc dot gnu.org
@ 2012-06-10 22:25 ` lsebald1 at umbc dot edu
2012-06-10 23:25 ` kkojima at gcc dot gnu.org
` (20 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: lsebald1 at umbc dot edu @ 2012-06-10 22:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #3 from Lawrence Sebald <lsebald1 at umbc dot edu> 2012-06-10 22:25:30 UTC ---
(In reply to comment #2)
> This line is related to PR 29996 and was introduced in this patch
> http://gcc.gnu.org/ml/gcc-patches/2010-01/msg01147.html
>
> I'm not sure whether removing it won't introduce some other side effects.
> Maybe it should have been something like this instead?
>
> flag_omit_frame_pointer = flag_omit_frame_pointer
> && (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);
That would probably make a bit more sense than just removing it entirely.
Although, it would probably be a good idea to put out a warning if the flag is
forcibly changed, just so people don't end up not knowing that the flag got
changed on them.
It does still seem odd to me that its switched on the preferred debugging
symbol format, since that may not actually represent the debugging symbol
format actually in use in the compiled code. I'm not all that familiar with GCC
internally, but I'd imagine there's some way to find out what debugging symbol
format is actually in-use to determine whether to change that flag or not.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (2 preceding siblings ...)
2012-06-10 22:25 ` lsebald1 at umbc dot edu
@ 2012-06-10 23:25 ` kkojima at gcc dot gnu.org
2012-06-11 13:49 ` chrbr at gcc dot gnu.org
` (19 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-10 23:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #4 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-10 23:24:57 UTC ---
Oleg's patch looks the right thing to do. Perhaps
if (PREFERRED_DEBUGGING_TYPE != DWARF2_DEBUG)
flag_omit_frame_pointer = 0;
might a bit straight representation indicating that that flag can't be
enabled on some debugging formats, though I don't mind either way.
I guess that [no-]omit-frame-pointer is a best effort type flag and
a unconditional warning when it isn't accomplished may be a bit overdo.
A conditional warning will be not bad, though it would be beyond target
issue here.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (3 preceding siblings ...)
2012-06-10 23:25 ` kkojima at gcc dot gnu.org
@ 2012-06-11 13:49 ` chrbr at gcc dot gnu.org
2012-06-12 0:05 ` kkojima at gcc dot gnu.org
` (18 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-11 13:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
chrbr at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chrbr at gcc dot gnu.org
--- Comment #5 from chrbr at gcc dot gnu.org 2012-06-11 13:48:50 UTC ---
I think this used to work, but the option initialization mechanism has changed
recently indeed.
Disabling it could break some supports for gprof or some old fashioned
unwinders that need a frame pointer
looking at the configure, it looks like there is no sh target using a different
setting for DWARF2_DEBUG. So this line could probably just be removed from
here.
If an hypothetical target doesn't use DWARF2_DEBUG then maybe it should define
SUBTARGET_FRAME_POINTER_REQUIRED to force it.
I suspect that a definition like could be needed.
#undef SUBTARGET_FRAME_POINTER_REQUIRED
#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
We need to check in which extend the current gprof is broken without a frame
pointer.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (4 preceding siblings ...)
2012-06-11 13:49 ` chrbr at gcc dot gnu.org
@ 2012-06-12 0:05 ` kkojima at gcc dot gnu.org
2012-06-12 6:25 ` chrbr at gcc dot gnu.org
` (17 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-12 0:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #6 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-12 00:05:05 UTC ---
I thought that -pg and -fomit-frame-pointer are always incompatible.
Agree with the possible issues for old unwinders.
I've forgotten that sh coff targets went away. Then, removing that
line might be enough.
I'd like to approve any patches for this PR :-) It should be
backported to the release branches, because this is a 4.6/4.7/4.8
regression from 4.5, AFAIK.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (5 preceding siblings ...)
2012-06-12 0:05 ` kkojima at gcc dot gnu.org
@ 2012-06-12 6:25 ` chrbr at gcc dot gnu.org
2012-06-12 13:26 ` chrbr at gcc dot gnu.org
` (16 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-12 6:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #7 from chrbr at gcc dot gnu.org 2012-06-12 06:25:09 UTC ---
(In reply to comment #6)
> I thought that -pg and -fomit-frame-pointer are always incompatible.
> Agree with the possible issues for old unwinders.
>
> I've forgotten that sh coff targets went away. Then, removing that
> line might be enough.
> I'd like to approve any patches for this PR :-) It should be
> backported to the release branches, because this is a 4.6/4.7/4.8
> regression from 4.5, AFAIK.
I will remove it, but first I'd like to make a few other checks:
I had a look to see why this was broken since the 4.6, and it appears that the
line was well formed when it lived within the OPTIMIZATION_OPTION hook. However
it was removed and all the settings moved away first to the
TARGET_OPTION_OVERRIDE hook, which now is bogus.
in the 4.6 branch we could still use TARGET_OPTION_INIT_STRUCT but not in the
4.7. so the fix will certainly differ between branches.
So I'd prefer that all the internal variables that used to be set in
sh_optimization_option should be double checked.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (6 preceding siblings ...)
2012-06-12 6:25 ` chrbr at gcc dot gnu.org
@ 2012-06-12 13:26 ` chrbr at gcc dot gnu.org
2012-06-12 13:56 ` kkojima at gcc dot gnu.org
` (15 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-12 13:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #8 from chrbr at gcc dot gnu.org 2012-06-12 13:26:42 UTC ---
Created attachment 27612
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27612
fix
All the suspicious flags reviewed and looked OK excepted maybe
-maccumulate-outgoing-args that looks safer when initialized from the .opt
files, and overridden only in case of conflict with unwind tables.
Removed entirely the forcing of -fomit-frame-pointer as we discussed, since it
doesn't seem needed anymore. However, note that if we shall discover that it is
still in use for a non dwarf2 target, the line should be moved to
common/config/sh:sh_option_init_struct()
checked that omit-frame-pointer is correctly enforced for -pg from
sh_frame_pointer_required.
I'd like to push it to the 4.6, 4.7, validated under sh-superh-elf.
sh4-linux on-going.
Thanks
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (7 preceding siblings ...)
2012-06-12 13:26 ` chrbr at gcc dot gnu.org
@ 2012-06-12 13:56 ` kkojima at gcc dot gnu.org
2012-06-13 5:59 ` chrbr at gcc dot gnu.org
` (14 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-12 13:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #9 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-12 13:56:37 UTC ---
The patch is pre-approved. Thanks for looking into the issue
thoroughly.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (8 preceding siblings ...)
2012-06-12 13:56 ` kkojima at gcc dot gnu.org
@ 2012-06-13 5:59 ` chrbr at gcc dot gnu.org
2012-06-13 6:52 ` kkojima at gcc dot gnu.org
` (13 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-13 5:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #10 from chrbr at gcc dot gnu.org 2012-06-13 05:59:16 UTC ---
currently analyzing a regression
gcc.dg/stack-usage-1.c scan-file foo\t(256|264)\tstatic
Don't know yet if it's a problem with the test or a side effect. But this
delays the commit.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (9 preceding siblings ...)
2012-06-13 5:59 ` chrbr at gcc dot gnu.org
@ 2012-06-13 6:52 ` kkojima at gcc dot gnu.org
2012-06-13 7:15 ` chrbr at gcc dot gnu.org
` (12 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-13 6:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #11 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-13 06:52:20 UTC ---
Looks a problem with the test. It should be tweaked with adding
#elif defined (__sh__)
# define SIZE 252
for frame pointer save area.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (10 preceding siblings ...)
2012-06-13 6:52 ` kkojima at gcc dot gnu.org
@ 2012-06-13 7:15 ` chrbr at gcc dot gnu.org
2012-06-13 7:39 ` kkojima at gcc dot gnu.org
` (11 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-13 7:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #12 from chrbr at gcc dot gnu.org 2012-06-13 07:14:49 UTC ---
(In reply to comment #11)
> Looks a problem with the test. It should be tweaked with adding
>
> #elif defined (__sh__)
> # define SIZE 252
>
> for frame pointer save area.
but that would make it dependent of the optimization level, wouldn't it ?
The problem is that -fomit-frame--pointer is not set in -O0. so the ways to
fixing it would be
1) enforce -fomit-frame-pointer in the stack-usage test, so we have a
deterministic result
2) change the machine description so that the frame pointer is not needed in
-O0. Actually I don't foresee any problem with this, but should be tried on the
trunk only and with a different patch.
for the current issue I propose to fix the test for the SH with 1). what do you
think Kaz ?
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (11 preceding siblings ...)
2012-06-13 7:15 ` chrbr at gcc dot gnu.org
@ 2012-06-13 7:39 ` kkojima at gcc dot gnu.org
2012-06-13 7:45 ` chrbr at gcc dot gnu.org
` (10 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-13 7:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #13 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-13 07:39:13 UTC ---
I thought that the test depends the optimization level and it assumes
-O0. I agree that enforcing -fomit-frame-pointer gives more deterministic
result, though it could break current tunings for various targets.
It would be better to ask it on the list.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (12 preceding siblings ...)
2012-06-13 7:39 ` kkojima at gcc dot gnu.org
@ 2012-06-13 7:45 ` chrbr at gcc dot gnu.org
2012-06-13 7:47 ` chrbr at gcc dot gnu.org
` (9 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-13 7:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #14 from chrbr at gcc dot gnu.org 2012-06-13 07:45:37 UTC ---
l(In reply to comment #13)
> I thought that the test depends the optimization level and it assumes
> -O0. I agree that enforcing -fomit-frame-pointer gives more deterministic
> result, though it could break current tunings for various targets.
> It would be better to ask it on the list.
This change can be made SH specific.
Index: gcc.dg/stack-usage-1.c
===================================================================
--- gcc.dg/stack-usage-1.c (revision 2720)
+++ gcc.dg/stack-usage-1.c (working copy)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-fstack-usage" } */
+/* { dg-options "-fomit-frame-pointer" { target { sh-*-* } } } */
/* This is aimed at testing basic support for -fstack-usage in the back-ends.
See the SPARC back-end for an example (grep flag_stack_usage in sparc.c).
Does this patch require another approval than yours ?
thanks
Christian
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (13 preceding siblings ...)
2012-06-13 7:45 ` chrbr at gcc dot gnu.org
@ 2012-06-13 7:47 ` chrbr at gcc dot gnu.org
2012-06-13 8:10 ` kkojima at gcc dot gnu.org
` (8 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-13 7:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #15 from chrbr at gcc dot gnu.org 2012-06-13 07:47:16 UTC ---
+/* { dg-options "-fstack-usage -fomit-frame-pointer" { target { sh-*-* } } }
*/
(In reply to comment #14)
> l(In reply to comment #13)
> > I thought that the test depends the optimization level and it assumes
> > -O0. I agree that enforcing -fomit-frame-pointer gives more deterministic
> > result, though it could break current tunings for various targets.
> > It would be better to ask it on the list.
>
> This change can be made SH specific.
>
> Index: gcc.dg/stack-usage-1.c
> ===================================================================
> --- gcc.dg/stack-usage-1.c (revision 2720)
> +++ gcc.dg/stack-usage-1.c (working copy)
> @@ -1,5 +1,6 @@
> /* { dg-do compile } */
> /* { dg-options "-fstack-usage" } */
> +/* { dg-options "-fomit-frame-pointer" { target { sh-*-* } } } */
>
> /* This is aimed at testing basic support for -fstack-usage in the back-ends.
> See the SPARC back-end for an example (grep flag_stack_usage in sparc.c).
>
> Does this patch require another approval than yours ?
>
> thanks
>
> Christian
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (14 preceding siblings ...)
2012-06-13 7:47 ` chrbr at gcc dot gnu.org
@ 2012-06-13 8:10 ` kkojima at gcc dot gnu.org
2012-06-13 8:23 ` chrbr at gcc dot gnu.org
` (7 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-13 8:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #16 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-13 08:09:45 UTC ---
> +/* { dg-options "-fstack-usage -fomit-frame-pointer" { target { sh-*-* } } }
*/
Looks OK. Pre-approved.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (15 preceding siblings ...)
2012-06-13 8:10 ` kkojima at gcc dot gnu.org
@ 2012-06-13 8:23 ` chrbr at gcc dot gnu.org
2012-06-13 8:48 ` kkojima at gcc dot gnu.org
` (6 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-13 8:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #17 from chrbr at gcc dot gnu.org 2012-06-13 08:22:50 UTC ---
(In reply to comment #16)
> > +/* { dg-options "-fstack-usage -fomit-frame-pointer" { target { sh-*-* } } }
> */
>
> Looks OK. Pre-approved.
thanks. by the way I just checked that the default harness compiles
stack-usage-1.c without optimization level, so this test is not dependent on
the optimization level as I said, sorry for having induced this.
so your proposal to change
> #elif defined (__sh__)
> # define SIZE 252
was good as well.
nevertheless I think that forcing -fomit-frame-pointer is still good. but if
you want to come back on this no problem.
thanks,
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (16 preceding siblings ...)
2012-06-13 8:23 ` chrbr at gcc dot gnu.org
@ 2012-06-13 8:48 ` kkojima at gcc dot gnu.org
2012-06-14 8:38 ` chrbr at gcc dot gnu.org
` (5 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-13 8:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #18 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-13 08:48:40 UTC ---
Please go ahead with the one liner in #15. It looks more
informative than a magic number 256 - 4.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (17 preceding siblings ...)
2012-06-13 8:48 ` kkojima at gcc dot gnu.org
@ 2012-06-14 8:38 ` chrbr at gcc dot gnu.org
2012-06-14 8:43 ` chrbr at gcc dot gnu.org
` (4 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-14 8:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #19 from chrbr at gcc dot gnu.org 2012-06-14 08:38:37 UTC ---
Author: chrbr
Date: Thu Jun 14 08:38:22 2012
New Revision: 188598
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188598
Log:
PR target/53621
* config/sh/sh.c (sh_option_override): Don't force
flag_omit_frame_pointer and maccumulate_outgoing_args.
* config/sh/sh.opt (maccumulate-outgoing-args): Init as Var.
* gcc.dg/stack-usage-1.c: Force -fomit-frame-pointer on SH.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sh/sh.opt
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/stack-usage-1.c
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (18 preceding siblings ...)
2012-06-14 8:38 ` chrbr at gcc dot gnu.org
@ 2012-06-14 8:43 ` chrbr at gcc dot gnu.org
2012-06-14 8:55 ` chrbr at gcc dot gnu.org
` (3 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-14 8:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #20 from chrbr at gcc dot gnu.org 2012-06-14 08:43:26 UTC ---
Author: chrbr
Date: Thu Jun 14 08:43:20 2012
New Revision: 188599
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188599
Log:
PR target/53621
* config/sh/sh.c (sh_option_override): Don't force
flag_omit_frame_pointer and maccumulate_outgoing_args.
* config/sh/sh.opt (maccumulate-outgoing-args): Init as Var.
* gcc.dg/stack-usage-1.c: Force -fomit-frame-pointer on SH.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/sh/sh.c
branches/gcc-4_7-branch/gcc/config/sh/sh.opt
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/stack-usage-1.c
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (19 preceding siblings ...)
2012-06-14 8:43 ` chrbr at gcc dot gnu.org
@ 2012-06-14 8:55 ` chrbr at gcc dot gnu.org
2012-06-14 8:58 ` chrbr at gcc dot gnu.org
` (2 subsequent siblings)
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-14 8:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #21 from chrbr at gcc dot gnu.org 2012-06-14 08:55:41 UTC ---
Author: chrbr
Date: Thu Jun 14 08:55:36 2012
New Revision: 188601
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188601
Log:
PR target/53621
* config/sh/sh.c (sh_option_override): Don't force
flag_omit_frame_pointer and maccumulate_outgoing_args.
* config/sh/sh.opt (maccumulate-outgoing-args): Init as Var.
* gcc.dg/stack-usage-1.c: Force -fomit-frame-pointer on SH.
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/sh/sh.c
branches/gcc-4_6-branch/gcc/config/sh/sh.opt
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/stack-usage-1.c
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (20 preceding siblings ...)
2012-06-14 8:55 ` chrbr at gcc dot gnu.org
@ 2012-06-14 8:58 ` chrbr at gcc dot gnu.org
2012-06-20 7:11 ` ebotcazou at gcc dot gnu.org
2012-06-20 8:33 ` kkojima at gcc dot gnu.org
23 siblings, 0 replies; 25+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-06-14 8:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
chrbr at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Version|4.7.0 |4.8.0
Resolution| |FIXED
Known to fail| |4.6.3
--- Comment #22 from chrbr at gcc dot gnu.org 2012-06-14 08:57:48 UTC ---
fixed in 4.6, 4.7, 4.8
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (21 preceding siblings ...)
2012-06-14 8:58 ` chrbr at gcc dot gnu.org
@ 2012-06-20 7:11 ` ebotcazou at gcc dot gnu.org
2012-06-20 8:33 ` kkojima at gcc dot gnu.org
23 siblings, 0 replies; 25+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-06-20 7:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot
| |gnu.org
--- Comment #23 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-06-20 07:11:07 UTC ---
Was the gcc.dg/stack-usage-1.c change posted on the gcc-patches@ list? It is
wrong, please back it out from all the branches and do like the other targets.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Bug target/53621] [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
` (22 preceding siblings ...)
2012-06-20 7:11 ` ebotcazou at gcc dot gnu.org
@ 2012-06-20 8:33 ` kkojima at gcc dot gnu.org
23 siblings, 0 replies; 25+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-06-20 8:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53621
--- Comment #24 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-06-20 08:33:29 UTC ---
I've changed it as requested. Apllied on 4.[678].
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2012-06-20 8:33 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-09 22:58 [Bug target/53621] New: [SH] Frame pointers not generated with -fno-omit-frame-pointer on GCC 4.7.0 bluecrab2887 at netscape dot net
2012-06-10 2:29 ` [Bug target/53621] " lsebald1 at umbc dot edu
2012-06-10 19:13 ` olegendo at gcc dot gnu.org
2012-06-10 22:25 ` lsebald1 at umbc dot edu
2012-06-10 23:25 ` kkojima at gcc dot gnu.org
2012-06-11 13:49 ` chrbr at gcc dot gnu.org
2012-06-12 0:05 ` kkojima at gcc dot gnu.org
2012-06-12 6:25 ` chrbr at gcc dot gnu.org
2012-06-12 13:26 ` chrbr at gcc dot gnu.org
2012-06-12 13:56 ` kkojima at gcc dot gnu.org
2012-06-13 5:59 ` chrbr at gcc dot gnu.org
2012-06-13 6:52 ` kkojima at gcc dot gnu.org
2012-06-13 7:15 ` chrbr at gcc dot gnu.org
2012-06-13 7:39 ` kkojima at gcc dot gnu.org
2012-06-13 7:45 ` chrbr at gcc dot gnu.org
2012-06-13 7:47 ` chrbr at gcc dot gnu.org
2012-06-13 8:10 ` kkojima at gcc dot gnu.org
2012-06-13 8:23 ` chrbr at gcc dot gnu.org
2012-06-13 8:48 ` kkojima at gcc dot gnu.org
2012-06-14 8:38 ` chrbr at gcc dot gnu.org
2012-06-14 8:43 ` chrbr at gcc dot gnu.org
2012-06-14 8:55 ` chrbr at gcc dot gnu.org
2012-06-14 8:58 ` chrbr at gcc dot gnu.org
2012-06-20 7:11 ` ebotcazou at gcc dot gnu.org
2012-06-20 8:33 ` kkojima at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).