From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Harald Anlauf <anlauf@gmx.de>
Cc: rep.dot.nop@gmail.com, fortran@gcc.gnu.org
Subject: Re: [PATCH,FORTRAN] Fix memory leak of gsymbol
Date: Sat, 30 Oct 2021 23:51:01 +0200 [thread overview]
Message-ID: <20211030235101.3d3e9041@nbbrfq> (raw)
In-Reply-To: <20211030185256.2e1c4434@nbbrfq>
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
> > The only caller is translate_all_program_units.
> > Since we free only module gsyms, even -fdump-fortran-global is
> > unaffected by this, fwiw.
AFAICS we do not have a test for -fdump-fortran-global
Do we want to add one, would the attached be OK?
thanks,
[-- Attachment #2: 0001-Fortran-add-testcase.patch --]
[-- Type: text/x-patch, Size: 1418 bytes --]
From 7e7856cf9ec88ab7fb48e7c73f9cc6495a4a9c22 Mon Sep 17 00:00:00 2001
From: Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
Date: Sat, 30 Oct 2021 23:43:12 +0200
Subject: [PATCH] Fortran: add testcase
gcc/testsuite/ChangeLog:
2021-10-30 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* gfortran.dg/dump-fortran-global-1.f90: New test.
---
.../gfortran.dg/dump-fortran-global-1.f90 | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 gcc/testsuite/gfortran.dg/dump-fortran-global-1.f90
diff --git a/gcc/testsuite/gfortran.dg/dump-fortran-global-1.f90 b/gcc/testsuite/gfortran.dg/dump-fortran-global-1.f90
new file mode 100644
index 00000000000..a8a1b15cce3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dump-fortran-global-1.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+! { dg-options "-fdump-fortran-global" }
+!
+! Test that -fdump-fortran-global works
+
+integer function myifun ()
+ myifun = 42
+end function myifun
+
+program testprogram
+ implicit none
+ interface
+ subroutine sub1()
+ end subroutine sub1
+ end interface
+ integer :: myifun
+ integer :: myint1 = 42
+ real :: myreal1 = .0815
+ if (myreal1 > 1.0) stop 1
+ if (myint1 < 1) stop 2
+ if (myint1 /= myifun()) stop 3
+end program testprogram
+! { dg-output "\[\n\r]*name=myifun, sym_name=myifun\[\n\r]" }
+! { dg-output "\[\n\r]*name=testprogram\[\n\r]" }
+! { dg-prune-output "\[\n\r]*" }
--
2.33.0
next prev parent reply other threads:[~2021-10-30 21:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-21 14:04 Bernhard Reutner-Fischer
2021-10-27 21:43 ` Bernhard Reutner-Fischer
2021-10-28 21:37 ` Harald Anlauf
2021-10-28 23:23 ` Bernhard Reutner-Fischer
2021-10-30 16:52 ` Bernhard Reutner-Fischer
2021-10-30 21:51 ` Bernhard Reutner-Fischer [this message]
2021-10-31 19:46 ` Harald Anlauf
2021-10-31 19:46 ` Harald Anlauf
2021-10-31 20:25 ` Bernhard Reutner-Fischer
2023-02-25 21:55 ` drop -fdump-fortran-global ? [was: Re: [PATCH,FORTRAN] Fix memory leak of gsymbol] Bernhard Reutner-Fischer
2023-02-25 22:59 ` Thomas König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211030235101.3d3e9041@nbbrfq \
--to=rep.dot.nop@gmail.com \
--cc=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).