public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1161: compiler permits "volatile final" variables
@ 2000-12-20 12:20 bryce
  0 siblings, 0 replies; only message in thread
From: bryce @ 2000-12-20 12:20 UTC (permalink / raw)
  To: java-gnats

>Number:         1161
>Category:       java
>Synopsis:       compiler permits "volatile final" variables
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tromey
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:16:30 PST 2000
>Closed-Date:    Tue Jun 06 16:45:20 PDT 2000
>Last-Modified:  Tue Jun  6 16:50:00 PDT 2000
>Originator:     Bryce McKinlay
>Release:        gcc version 2.96 20000305 (experimental)
>Organization:
>Environment:
any
>Description:
The keywords "volatile" and "final" are contradictory. The
JLS 2nd ed (8.3.1) says "A compile-time error occurs if a 
final variable is also declared volatile."

gcj does not throw an error.
>How-To-Repeat:
Compile this test:

class Volatile
{
  volatile final int foo = 8;
}
>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/164


From: tromey@sourceware.cygnus.com
To: java-gnats@sourceware.cygnus.com
Cc:  
Subject: gcj/164
Date: 7 Mar 2000 00:49:19 -0000

 CVSROOT:	/cvs/java
 Module name:	libgcj
 Changes by:	tromey@sourceware.cygnus.com	00/03/06 16:49:19
 
 Modified files:
 	libjava/testsuite: ChangeLog 
 Added files:
 	libjava/testsuite/libjava.compile: PR164.java PR164.xfail 
 
 Log message:
 	Test for PR gcj/164:
 	* libjava.compile/PR164.xfail: New file.
 	* libjava.compile/PR164.java: New file.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/ChangeLog.diff?cvsroot=java&r1=1.62&r2=1.63
 http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/libjava.compile/PR164.java.diff?cvsroot=java&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/gcc/libjava/testsuite/libjava.compile/PR164.xfail.diff?cvsroot=java&r1=NONE&r2=1.1
 
Responsible-Changed-From-To: apbianco->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Wed Apr  5 17:45:09 2000
Responsible-Changed-Why:
    I fixed this.
State-Changed-From-To: open->feedback
State-Changed-By: tromey
State-Changed-When: Wed Apr  5 17:45:09 2000
State-Changed-Why:
    I checked in this patch:
    http://gcc.gnu.org/ml/gcc-patches/2000-04/msg00195.html
    Could you try it out & get back to me?

From: tromey@cygnus.com
To: apbianco@cygnus.com, bryce@albatross.co.nz,
  java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Cc:  
Subject: Re: gcj/164
Date: 6 Apr 2000 00:45:09 -0000

 Synopsis: compiler permits "volatile final" variables
 
 Responsible-Changed-From-To: apbianco->tromey
 Responsible-Changed-By: tromey
 Responsible-Changed-When: Wed Apr  5 17:45:09 2000
 Responsible-Changed-Why:
     I fixed this.
 State-Changed-From-To: open->feedback
 State-Changed-By: tromey
 State-Changed-When: Wed Apr  5 17:45:09 2000
 State-Changed-Why:
     I checked in this patch:
     http://gcc.gnu.org/ml/gcc-patches/2000-04/msg00195.html
     Could you try it out & get back to me?
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=164&database=java

From: Bryce McKinlay <bryce@albatross.co.nz>
To: java-gnats@sourceware.cygnus.com, tromey@cygnus.com, bryce@albatross.co.nz
Cc:  
Subject: Re: gcj/164
Date: Tue, 06 Jun 2000 17:44:09 +1200

 There appears to be a problem with this patch. Building the test case
 now results in an ICE:
 
 (gdb) r Volatile.java -fno-use-divide-subroutine
 -fasynchronous-exceptions -quie
 t -g1 -version -o /tmp/ccLJoJNC.s
 Starting program: /usr/local/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.96/jc1
 Volatile
 .java -fno-use-divide-subroutine -fasynchronous-exceptions -quiet -g1
 -version -
 o /tmp/ccLJoJNC.s
 GNU Java version 2.96 20000605 (experimental) (i686-pc-linux-gnu)
 compiled by GN
 U C version 2.96 20000601 (experimental).
 
 Program received signal SIGSEGV, Segmentation fault.
 0x8050dbd in issue_warning_error_from_context (cl=0x0,
     msg=0x823ebe0 "Inconsistent member declaration.  At most one of
 `final' or `
 volatile' may be specified", ap=0xbfffefa8) at ./parse.y:2976
 2976    ./parse.y: No such file or directory.
 (gdb) bt
 #0  0x8050dbd in issue_warning_error_from_context (cl=0x0,
     msg=0x823ebe0 "Inconsistent member declaration.  At most one of
 `final' or `
 volatile' may be specified", ap=0xbfffefa8) at ./parse.y:2976
 #1  0x8050e67 in parse_error_context (cl=0x0,
     msg=0x823ebe0 "Inconsistent member declaration.  At most one of
 `final' or `
 volatile' may be specified") at ./parse.y:3009
 #2  0x8053962 in check_modifiers_consistency (flags=80) at
 ./parse.y:4621
 #3  0x804dc61 in java_parse () at ./parse.y:898
 #4  0x80788a2 in parse_source_file (file=0x82c6788)
     at ../../../gcc/java/jcf-parse.c:772
 #5  0x8078c99 in yyparse () at ../../../gcc/java/jcf-parse.c:905
 #6  0x808383c in compile_file (name=0xbffffa93 "Volatile.java")
     at ../../gcc/toplev.c:2288
 #7  0x8086b53 in main (argc=9, argv=0xbffff924) at
 ../../gcc/toplev.c:4702
 
 It appears that issue_warning_error_from_context() doesn't like a NULL
 class argument.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=164&database=java
 
 
 

From: Tom Tromey <tromey@cygnus.com>
To: Bryce McKinlay <bryce@albatross.co.nz>
Cc: java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Subject: Re: gcj/164
Date: Tue, 6 Jun 2000 11:47:18 -0700 (PDT)

 Bryce> There appears to be a problem with this patch. Building the
 Bryce> test case now results in an ICE:
 
 Thanks Bryce.
 Alex and I found the problem.
 I've checked in a patch.
 Could you try it?
 
 Tom
State-Changed-From-To: feedback->closed
State-Changed-By: bryce
State-Changed-When: Tue Jun  6 16:45:20 2000
State-Changed-Why:
    The new fix works fine.

From: bryce@albatross.co.nz
To: bryce@albatross.co.nz, java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Cc:  
Subject: Re: gcj/164
Date: 6 Jun 2000 23:45:20 -0000

 Synopsis: compiler permits "volatile final" variables
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: bryce
 State-Changed-When: Tue Jun  6 16:45:20 2000
 State-Changed-Why:
     The new fix works fine.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=164&database=java
>Unformatted:



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

only message in thread, other threads:[~2000-12-20 12:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:20 java/1161: compiler permits "volatile final" variables bryce

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