public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37107]  New: Incorrect code generated after function inlining
@ 2008-08-13  8:10 oakad at yahoo dot com
  2008-08-16 22:15 ` [Bug middle-end/37107] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: oakad at yahoo dot com @ 2008-08-13  8:10 UTC (permalink / raw)
  To: gcc-bugs

In the attached file (cfi_flash.c), the function flash_detect_cfi is inlined
into the function flash_get_size. flash_detect_cfi accepts (arg 2) a pointer to
structure defined on stack in flash_get_size. Upon completion, some fields from
the structure in question are referenced (lines 1731 - 1734).

The generated code for the function (flash_get_size.asm, lines 63-70) does none
of these, introducing a nasty runtime bug.

Build parameters:

powerpc-linux-gnuspe-gcc -g  -Os   -fPIC -ffixed-r14 -meabi -D__KERNEL__
-DTEXT_BASE=0xfffc0000 -I/root/u-boot-1.3.3/include -fno-builtin
-ffreestanding -nostdinc
-isystem /usr/local/powerpc/lib/gcc/powerpc-linux-gnuspe/4.3.1/include
-pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2
-Wa,-me500 -msoft-float -mno-string -mno-spe -DCONFIG_E500=1
-DCONFIG_MPC85xx=1 -DCONFIG_MPC8548=1 -Wall -Wstrict-prototypes
-c -o cfi_flash.o cfi_flash.c


-- 
           Summary: Incorrect code generated after function inlining
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: oakad at yahoo dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: powerpc-linux-gnuspe


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37107


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-13  6:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-37107-4@http.gcc.gnu.org/bugzilla/>
2012-01-13  6:41 ` [Bug middle-end/37107] Incorrect code generated after function inlining pinskia at gcc dot gnu.org
2008-08-13  8:10 [Bug c/37107] New: " oakad at yahoo dot com
2008-08-16 22:15 ` [Bug middle-end/37107] " pinskia at gcc dot gnu dot org
2008-08-20  6:34 ` oakad at yahoo dot com
2008-08-20  6:35 ` oakad at yahoo dot com
2008-08-20  6:35 ` oakad at yahoo dot com
2008-12-27  6:23 ` pinskia at gcc dot gnu dot 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).