public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60877] New: __attribute__optimize("O0") conflict with static function at -O1
@ 2014-04-17 21:19 mnp at agtmt dot com
2014-04-17 21:56 ` [Bug target/60877] " pinskia at gcc dot gnu.org
2014-04-18 7:32 ` jakub at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: mnp at agtmt dot com @ 2014-04-17 21:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60877
Bug ID: 60877
Summary: __attribute__optimize("O0") conflict with static
function at -O1
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: mnp at agtmt dot com
Created attachment 32628
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32628&action=edit
preprocessed .i file
#include <stdio.h>
static int sub1(int i, int j)
{
return j;
}
void __attribute__((optimize("O0"))) main(void)
{
int k;
k = sub1(0, 1);
printf("%d\n",k);
}
gcc -O1
if sub1() is static, return is wrong
movl %edx, %eax
ret
if not static, return is correct
movl 8(%esp), %eax
ret
gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/60877] __attribute__optimize("O0") conflict with static function at -O1
2014-04-17 21:19 [Bug c/60877] New: __attribute__optimize("O0") conflict with static function at -O1 mnp at agtmt dot com
@ 2014-04-17 21:56 ` pinskia at gcc dot gnu.org
2014-04-18 7:32 ` jakub at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-04-17 21:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60877
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*-*
Component|c |target
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a target specific issue where the target is changing the ABI but not
changing the ABI for the callee function.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/60877] __attribute__optimize("O0") conflict with static function at -O1
2014-04-17 21:19 [Bug c/60877] New: __attribute__optimize("O0") conflict with static function at -O1 mnp at agtmt dot com
2014-04-17 21:56 ` [Bug target/60877] " pinskia at gcc dot gnu.org
@ 2014-04-18 7:32 ` jakub at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-18 7:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60877
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Dup.
*** This bug has been marked as a duplicate of bug 60062 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-18 7:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-17 21:19 [Bug c/60877] New: __attribute__optimize("O0") conflict with static function at -O1 mnp at agtmt dot com
2014-04-17 21:56 ` [Bug target/60877] " pinskia at gcc dot gnu.org
2014-04-18 7:32 ` jakub 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).