public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30522]  New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
@ 2007-01-21  1:18 burnus at gcc dot gnu dot org
  2007-01-22 21:34 ` [Bug fortran/30522] " fxcoudert at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-21  1:18 UTC (permalink / raw)
  To: gcc-bugs

(This bug description assumes that the patch to PR30520 is already applied.)

gfortran currently permits the following redundant VOLATILE attributes:

module A
 real :: vol
end module A
module B
  use A
  volatile :: vol
  volatile :: vol ! WRONG, but accepted
end module B

gfortran wrongly rejects the following VOLATILE:

module test
  real, volatile :: A
contains
  subroutine sub
    volatile :: A ! VALID, but rejected
  end subroutine sub
end module test

Check: In the following example, the variable "global" should only be volatile
in subroutine A. Does this really happen?

program test
  real :: global
  ! global should not be volatile here
contains
  subroutine A
    volatile :: global
  end subroutine A
  subroutine B
  ! global should not be volatile here
  end subroutine B
end program test


-- 
           Summary: Host-/use-associated VOLATILE variable: volatile scope,
                    redundent attributes
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid, accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
 BugsThisDependsOn: 30520


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


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

* [Bug fortran/30522] Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
  2007-01-21  1:18 [Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes burnus at gcc dot gnu dot org
@ 2007-01-22 21:34 ` fxcoudert at gcc dot gnu dot org
  2007-02-08  9:45 ` patchapp at dberlin dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-01-22 21:34 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-01-22 21:34:38
               date|                            |


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


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

* [Bug fortran/30522] Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
  2007-01-21  1:18 [Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes burnus at gcc dot gnu dot org
  2007-01-22 21:34 ` [Bug fortran/30522] " fxcoudert at gcc dot gnu dot org
@ 2007-02-08  9:45 ` patchapp at dberlin dot org
  2007-02-20  9:22 ` burnus at gcc dot gnu dot org
  2007-02-20  9:46 ` burnus at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: patchapp at dberlin dot org @ 2007-02-08  9:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from patchapp at dberlin dot org  2007-02-08 09:45 -------
Subject: Bug number PR30522

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00682.html


-- 


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


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

* [Bug fortran/30522] Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
  2007-01-21  1:18 [Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes burnus at gcc dot gnu dot org
  2007-01-22 21:34 ` [Bug fortran/30522] " fxcoudert at gcc dot gnu dot org
  2007-02-08  9:45 ` patchapp at dberlin dot org
@ 2007-02-20  9:22 ` burnus at gcc dot gnu dot org
  2007-02-20  9:46 ` burnus at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-20  9:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2007-02-20 09:22 -------
Subject: Bug 30522

Author: burnus
Date: Tue Feb 20 09:22:28 2007
New Revision: 122157

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122157
Log:
fortran/
2007-02-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/30522
        * symbol.c (gfc_add_volatile): Allow to set VOLATILE
          attribute for host-associated variables.
        * gfortran.h (symbol_attribute): Save namespace
          where VOLATILE has been set.
        * trans-decl.c (gfc_finish_var_decl): Move variable
          declaration to the top.

testsuite/
2007-02-20  Tobias Burnus  <burnus@net-b.de>

       PR fortran/30522
       * gfortran.dg/volatile10.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/volatile10.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/30522] Host-/use-associated VOLATILE variable: volatile scope, redundent attributes
  2007-01-21  1:18 [Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-02-20  9:22 ` burnus at gcc dot gnu dot org
@ 2007-02-20  9:46 ` burnus at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-20  9:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2007-02-20 09:46 -------
Fixed in 4.3 (not present in 4.2).
Missed optimization is PR 30733


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-02-20  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-21  1:18 [Bug fortran/30522] New: Host-/use-associated VOLATILE variable: volatile scope, redundent attributes burnus at gcc dot gnu dot org
2007-01-22 21:34 ` [Bug fortran/30522] " fxcoudert at gcc dot gnu dot org
2007-02-08  9:45 ` patchapp at dberlin dot org
2007-02-20  9:22 ` burnus at gcc dot gnu dot org
2007-02-20  9:46 ` burnus 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).