public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96469] New: Compile-time check for change in DO variable in contained procedures
@ 2020-08-04 18:33 tkoenig at gcc dot gnu.org
  2020-08-04 18:33 ` [Bug fortran/96469] " tkoenig at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-08-04 18:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96469

            Bug ID: 96469
           Summary: Compile-time check for change in DO variable in
                    contained procedures
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

What's checked at runtime in do_check_4.f90

PROGRAM test
  IMPLICIT NONE
  INTEGER :: i
  DO i=1,100
    CALL do_something()
  ENDDO
CONTAINS
 SUBROUTINE do_something()
 IMPLICIT NONE
   DO i=1,10
   ENDDO
 END SUBROUTINE do_something
END PROGRAM test

can also be tested at compile-time, with an error issued.

As a matter of fact, I have a patch regtesting right now, I just wanted
put this into bugzilla as an anchor.

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

* [Bug fortran/96469] Compile-time check for change in DO variable in contained procedures
  2020-08-04 18:33 [Bug fortran/96469] New: Compile-time check for change in DO variable in contained procedures tkoenig at gcc dot gnu.org
@ 2020-08-04 18:33 ` tkoenig at gcc dot gnu.org
  2020-08-05 16:40 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-08-04 18:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96469

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |tkoenig at gcc dot gnu.org
   Last reconfirmed|                            |2020-08-04
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

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

* [Bug fortran/96469] Compile-time check for change in DO variable in contained procedures
  2020-08-04 18:33 [Bug fortran/96469] New: Compile-time check for change in DO variable in contained procedures tkoenig at gcc dot gnu.org
  2020-08-04 18:33 ` [Bug fortran/96469] " tkoenig at gcc dot gnu.org
@ 2020-08-05 16:40 ` cvs-commit at gcc dot gnu.org
  2020-08-05 18:55 ` cvs-commit at gcc dot gnu.org
  2020-08-05 18:58 ` tkoenig at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-05 16:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96469

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Kथà¤nig <tkoenig@gcc.gnu.org>:

https://gcc.gnu.org/g:27eac9ee6137a6b5ae693b54cafa22bdc0cbcd5a

commit r11-2578-g27eac9ee6137a6b5ae693b54cafa22bdc0cbcd5a
Author: Thomas Koenig <tkoenig@gcc.gnu.org>
Date:   Wed Aug 5 18:37:32 2020 +0200

    Static analysis for definition of DO index variables in contained
procedures.

    When encountering a procedure call in a DO loop, this patch checks if
    the call is to a contained procedure, and if it is, check for
    changes in the index variable.

    gcc/fortran/ChangeLog:

            PR fortran/96469
            * frontend-passes.c (doloop_contained_function_call): New
            function.
            (doloop_contained_procedure_code): New function.
            (CHECK_INQ): Macro for inquire checks.
            (doloop_code): Invoke doloop_contained_procedure_code and
            doloop_contained_function_call if appropriate.
            (do_intent): Likewise.

    gcc/testsuite/ChangeLog:

            PR fortran/96469
            * gfortran.dg/do_check_4.f90: Hide change in index variable
            from compile-time analysis.
            * gfortran.dg/do_check_13.f90: New test.

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

* [Bug fortran/96469] Compile-time check for change in DO variable in contained procedures
  2020-08-04 18:33 [Bug fortran/96469] New: Compile-time check for change in DO variable in contained procedures tkoenig at gcc dot gnu.org
  2020-08-04 18:33 ` [Bug fortran/96469] " tkoenig at gcc dot gnu.org
  2020-08-05 16:40 ` cvs-commit at gcc dot gnu.org
@ 2020-08-05 18:55 ` cvs-commit at gcc dot gnu.org
  2020-08-05 18:58 ` tkoenig at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-05 18:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96469

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Kथà¤nig <tkoenig@gcc.gnu.org>:

https://gcc.gnu.org/g:dd30d93f1a3ead7b814c1b179cf7197e4bf1e183

commit r11-2579-gdd30d93f1a3ead7b814c1b179cf7197e4bf1e183
Author: Thomas Koenig <tkoenig@gcc.gnu.org>
Date:   Wed Aug 5 20:53:44 2020 +0200

    Added test case to make sure that legal cases still pass.

    gcc/testsuite/ChangeLog:

            PR fortran/96469
            * gfortran.dg/do_check_14.f90: New test.

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

* [Bug fortran/96469] Compile-time check for change in DO variable in contained procedures
  2020-08-04 18:33 [Bug fortran/96469] New: Compile-time check for change in DO variable in contained procedures tkoenig at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-08-05 18:55 ` cvs-commit at gcc dot gnu.org
@ 2020-08-05 18:58 ` tkoenig at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-08-05 18:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96469

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

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

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Fixed on trunk, closing.

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

end of thread, other threads:[~2020-08-05 18:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 18:33 [Bug fortran/96469] New: Compile-time check for change in DO variable in contained procedures tkoenig at gcc dot gnu.org
2020-08-04 18:33 ` [Bug fortran/96469] " tkoenig at gcc dot gnu.org
2020-08-05 16:40 ` cvs-commit at gcc dot gnu.org
2020-08-05 18:55 ` cvs-commit at gcc dot gnu.org
2020-08-05 18:58 ` tkoenig at gcc dot gnu.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).