public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "roger.ferrer at bsc dot es" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54822] New: OpenMP - Firstprivate optional dummy arguments crash if not present Date: Fri, 05 Oct 2012 09:05:00 -0000 [thread overview] Message-ID: <bug-54822-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54822 Bug #: 54822 Summary: OpenMP - Firstprivate optional dummy arguments crash if not present Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: roger.ferrer@bsc.es The following program SUBROUTINE S(X) IMPLICIT NONE INTEGER, OPTIONAL :: X !$OMP TASK FIRSTPRIVATE(X) IF (PRESENT(X)) THEN X = X + 1 END IF !$OMP END TASK END SUBROUTINE S PROGRAM MAIN IMPLICIT NONE INTERFACE SUBROUTINE S(X) IMPLICIT NONE INTEGER, OPTIONAL :: X END SUBROUTINE S END INTERFACE CALL S() END PROGRAM MAIN crashes at runtime using gfortran 4.7.1 $ gfortran -o bug bug.f90 -fopenmp $ ./bug Program received signal SIGSEGV: Segmentation fault - invalid memory reference. Backtrace for this error: #0 0x7FC7C9245667 #1 0x7FC7C9245C34 #2 0x7FC7C83DE4EF #3 0x4007B2 in s_._omp_cpyfn.1 at bug.f90:0 #4 0x7FC7C8DA2875 #5 0x40074D in s_ #6 0x40075D in MAIN__ at bug.f90:0 Violació de segment I think that the initialization of the firstprivate X using the non-present dummy argument X is causing the crash.
next reply other threads:[~2012-10-05 9:05 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-05 9:05 roger.ferrer at bsc dot es [this message] 2012-10-05 9:48 ` [Bug fortran/54822] " jakub at gcc dot gnu.org 2012-10-05 9:53 ` roger.ferrer at bsc dot es 2014-12-09 20:16 ` dominiq at lps dot ens.fr
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=bug-54822-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).