public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/8219: gcj order of argument evaluation problem
@ 2002-12-01 15:26 tromey
  0 siblings, 0 replies; 2+ messages in thread
From: tromey @ 2002-12-01 15:26 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, green, java-prs, nobody, tromey

Synopsis: gcj order of argument evaluation problem

Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Sun Dec  1 15:26:53 2002
Responsible-Changed-Why:
    I'm handling the administrivia
State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Sun Dec  1 15:26:53 2002
State-Changed-Why:
    This seems to be fixed on the trunk.
    I think Andrew checked in a patch to fix it.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8219


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

* java/8219: gcj order of argument evaluation problem
@ 2002-10-13 23:36 green
  0 siblings, 0 replies; 2+ messages in thread
From: green @ 2002-10-13 23:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8219
>Category:       java
>Synopsis:       gcj order of argument evaluation problem
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 13 23:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.3 20021005 (experimental)
>Organization:
>Environment:
System: Linux louie 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/green/FSF/GCC/HEAD/gcc/configure --prefix=/louie/green/latest/i --enable-languages=c,c++,java : (reconfigured) 
>Description:
Here's a bug in how gcj evaluates method arguments....

public class bug
{
    private static int first (int x, int y)
    {
        return x;
    }

    public static void main (String[] args)
    {
        int l = args.length;

        /* This should print:
0
0
1
        */
        System.out.println (l);
        System.out.println (first (l, ++l));
        System.out.println (l);
    }
}

This is correct output...

[green@build green]$ gcj -o bug --main=bug bug.java -O0
[green@build green]$ ./bug
0
0
1

This is bad output...

[green@build green]$ gcj -o bug --main=bug bug.java -O2
[green@build green]$ ./bug
0
1
1


Is looks as though the rtl we're generating is bad from the start - so
it's unlikely to be a problem with any on the rtl-based optimizations.


>How-To-Repeat:
See above.
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-12-01 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-01 15:26 java/8219: gcj order of argument evaluation problem tromey
  -- strict thread matches above, loose matches on Subject: below --
2002-10-13 23:36 green

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