public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/8299: sh-gcc-3.2 Optimizing problem
@ 2002-10-21  4:26 tanaka
  0 siblings, 0 replies; only message in thread
From: tanaka @ 2002-10-21  4:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8299
>Category:       c
>Synopsis:       sh-gcc-3.2 Optimizing problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 21 04:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Takayasu Tanaka
>Release:        gcc version 3.2
>Organization:
>Environment:
RedHat Linux 7.1
Configured with: ../gcc-3.2/configure --enable-languages=c,c++ --prefix=/home/tanaka/sh/bin --target=sh-unknown-elf
>Description:
On some condition, arguments of a function are stored in wrong position.
>How-To-Repeat:
---------- source code ------------      
typedef struct { 
        int x; 
        int y; 
} PNT; 
        
int g(int a1, int a2, int a3, int a4, int a5, int a6)
{       
        return 0;
}       
        
int f(int a1, int a2, int a3, PNT p, int a6)
{       
        return g( a1, a2, a3, p.x, p.y, a6);
}       
        
void _start()
{       
        int a1 = 1, a2 = 2, a3 = 3; PNT p = {4, 5}; int a6 = 6;
        
        f( a1, a2, a3, p, a6 );
}
------------------------------------
Argument of g() must be 1, 2, 3, 4, 5, 6.
But, compiled with -O2, argument of g() is
1, 2, 3, 4, 6, 6.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-21 11:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21  4:26 c/8299: sh-gcc-3.2 Optimizing problem tanaka

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).