public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/101337] New: gfortran doesn't diagnose all operands with constraint violations
@ 2021-07-06  3:20 sandra at gcc dot gnu.org
  2021-10-21 21:16 ` [Bug fortran/101337] " sandra at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-07-06  3:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101337
           Summary: gfortran doesn't diagnose all operands with constraint
                    violations
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sandra at gcc dot gnu.org
  Target Milestone: ---

In a statement like

    a = x + y

if both x and y violate constraints in the Fortran standard, gfortran only
issues a diagnostic for the first invalid operand and ignores the other one.

I ran into this in my WIP TS 29113 testsuite

https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574115.html

particularly in types/c407b-2.f90 and types/c535b-2.f90.  I was figuring that
since the standard requires implementations to diagnose constraint violations,
it was supposed to diagnose *all* constraint violations, not give up after the
first one in an expression.  :-S

This is probably very low on the scale of bang-for-the-buck so I am not really
expecting it to be fixed any time soon, but as I've xfailed the tests looking
for the omitted diagnostics it would be good to point to an issue recording the
bug.

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

* [Bug fortran/101337] gfortran doesn't diagnose all operands with constraint violations
  2021-07-06  3:20 [Bug fortran/101337] New: gfortran doesn't diagnose all operands with constraint violations sandra at gcc dot gnu.org
@ 2021-10-21 21:16 ` sandra at gcc dot gnu.org
  2021-10-31 19:52 ` aldot at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-10-21 21:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from sandra at gcc dot gnu.org ---
This is likely a "won't fix" bug, but I'll leave it open for now.  The test
cases (now committed) are still XFAILed.

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

* [Bug fortran/101337] gfortran doesn't diagnose all operands with constraint violations
  2021-07-06  3:20 [Bug fortran/101337] New: gfortran doesn't diagnose all operands with constraint violations sandra at gcc dot gnu.org
  2021-10-21 21:16 ` [Bug fortran/101337] " sandra at gcc dot gnu.org
@ 2021-10-31 19:52 ` aldot at gcc dot gnu.org
  2021-11-05  3:00 ` sandra at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: aldot at gcc dot gnu.org @ 2021-10-31 19:52 UTC (permalink / raw)
  To: gcc-bugs

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

Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2021-October
                   |                            |/582983.html
                 CC|                            |aldot at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-10-31

--- Comment #2 from Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> ---
confirmed

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

* [Bug fortran/101337] gfortran doesn't diagnose all operands with constraint violations
  2021-07-06  3:20 [Bug fortran/101337] New: gfortran doesn't diagnose all operands with constraint violations sandra at gcc dot gnu.org
  2021-10-21 21:16 ` [Bug fortran/101337] " sandra at gcc dot gnu.org
  2021-10-31 19:52 ` aldot at gcc dot gnu.org
@ 2021-11-05  3:00 ` sandra at gcc dot gnu.org
  2021-11-07 17:35 ` cvs-commit at gcc dot gnu.org
  2021-11-07 17:37 ` sandra at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-11-05  3:00 UTC (permalink / raw)
  To: gcc-bugs

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

sandra at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |sandra at gcc dot gnu.org

--- Comment #3 from sandra at gcc dot gnu.org ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-November/056906.html

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

* [Bug fortran/101337] gfortran doesn't diagnose all operands with constraint violations
  2021-07-06  3:20 [Bug fortran/101337] New: gfortran doesn't diagnose all operands with constraint violations sandra at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-05  3:00 ` sandra at gcc dot gnu.org
@ 2021-11-07 17:35 ` cvs-commit at gcc dot gnu.org
  2021-11-07 17:37 ` sandra at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-07 17:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sandra Loosemore <sandra@gcc.gnu.org>:

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

commit r12-4979-gee11be7f2d788e6055ebed9746a8d8ac3cb04b8e
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Thu Nov 4 15:43:29 2021 -0700

    Fortran: Diagnose all operands/arguments with constraint violations

    04-Nov-2021  Sandra Loosemore <sandra@codesourcery.com>
                 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>

             PR fortran/101337

    gcc/fortran/ChangeLog:
            * interface.c (gfc_compare_actual_formal): Continue checking
            all arguments after encountering an error.
            * intrinsic.c (do_ts29113_check): Likewise.
            * resolve.c (resolve_operator): Continue resolving on op2 error.

    gcc/testsuite/ChangeLog:
            * gfortran.dg/bessel_3.f90: Expect additional diagnostics from
            multiple bad arguments in the call.
            * gfortran.dg/pr24823.f: Likewise.
            * gfortran.dg/pr39937.f: Likewise.
            * gfortran.dg/pr41011.f: Likewise.
            * gfortran.dg/pr61318.f90: Likewise.
            * gfortran.dg/c-interop/c407b-2.f90: Remove xfails.
            * gfortran.dg/c-interop/c535b-2.f90: Likewise.

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

* [Bug fortran/101337] gfortran doesn't diagnose all operands with constraint violations
  2021-07-06  3:20 [Bug fortran/101337] New: gfortran doesn't diagnose all operands with constraint violations sandra at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-11-07 17:35 ` cvs-commit at gcc dot gnu.org
@ 2021-11-07 17:37 ` sandra at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-11-07 17:37 UTC (permalink / raw)
  To: gcc-bugs

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

sandra at gcc dot gnu.org changed:

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

--- Comment #5 from sandra at gcc dot gnu.org ---
Fixed, at least the cases I wrote testcases for relating to TS29113 constraint
violations.

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

end of thread, other threads:[~2021-11-07 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06  3:20 [Bug fortran/101337] New: gfortran doesn't diagnose all operands with constraint violations sandra at gcc dot gnu.org
2021-10-21 21:16 ` [Bug fortran/101337] " sandra at gcc dot gnu.org
2021-10-31 19:52 ` aldot at gcc dot gnu.org
2021-11-05  3:00 ` sandra at gcc dot gnu.org
2021-11-07 17:35 ` cvs-commit at gcc dot gnu.org
2021-11-07 17:37 ` sandra 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).