public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/59671] New: Improper Ada behavior under -gnat2012
@ 2014-01-03 21:34 p-kell at live dot com
  2014-01-04 18:26 ` [Bug ada/59671] " ebotcazou at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: p-kell at live dot com @ 2014-01-03 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59671
           Summary: Improper Ada behavior under -gnat2012
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: p-kell at live dot com

Compilation under -gnat2012 fails with this error:
"conflict of writable function parameter in construct with arbitrary order of
evaluation"

Fallback to -gnat2005, and it reports that functions can only have an "in"
parameter, which is correct for -gnat2005; however, they can be used in
-gnat2012. Removing the "out" parameter and compiling with -gnat2005 resulted
in a correct build. Immediately compiling with -gnat2012 resulted in a correct
build. I was lucky in that I didn't actually need the "out" on those
parameters. (note: an unused "out" doesn't cause problems in an of itself)

The current behavior is not following the ARM2012, which is why I've labeled
this as a "blocker". "in out" parameters on functions is one of the major
enhancements to Ada 2012.

Other compilation flags: "-O2 -gnato -gnatE -fstack-check"
Error still occurs without "-O2"


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

* [Bug ada/59671] Improper Ada behavior under -gnat2012
  2014-01-03 21:34 [Bug ada/59671] New: Improper Ada behavior under -gnat2012 p-kell at live dot com
@ 2014-01-04 18:26 ` ebotcazou at gcc dot gnu.org
  2014-01-05 18:24 ` p-kell at live dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-01-04 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ebotcazou at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
           Severity|blocker                     |normal

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
"Blocker" is when there are no workarounds.

*** This bug has been marked as a duplicate of bug 58151 ***


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

* [Bug ada/59671] Improper Ada behavior under -gnat2012
  2014-01-03 21:34 [Bug ada/59671] New: Improper Ada behavior under -gnat2012 p-kell at live dot com
  2014-01-04 18:26 ` [Bug ada/59671] " ebotcazou at gcc dot gnu.org
@ 2014-01-05 18:24 ` p-kell at live dot com
  2014-01-05 22:03 ` ebotcazou at gcc dot gnu.org
  2014-01-06  6:54 ` ebotcazou at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: p-kell at live dot com @ 2014-01-05 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Kelly <p-kell at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |---

--- Comment #2 from Patrick Kelly <p-kell at live dot com> ---
Exactly why I marked this as blocker. There is no workaround. -gnat2012 will
not compile properly, plain and simple. Adding "out" to a parameter of a
function results in this error. Stepping back to -gnat2005 is not a workaround,
it's moving to a different language; it's a less severe form of moving from,
say Ada to ALGOL.

I disagree with this being a duplicate, as the problem in that report, which I
read prior to filing this one, is an issue with pragmas behavior, while this is
with "out" parameters of functions; these are not the same thing. Two different
issues are reporting the same error message; the error message is what is
common, not the error.


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

* [Bug ada/59671] Improper Ada behavior under -gnat2012
  2014-01-03 21:34 [Bug ada/59671] New: Improper Ada behavior under -gnat2012 p-kell at live dot com
  2014-01-04 18:26 ` [Bug ada/59671] " ebotcazou at gcc dot gnu.org
  2014-01-05 18:24 ` p-kell at live dot com
@ 2014-01-05 22:03 ` ebotcazou at gcc dot gnu.org
  2014-01-06  6:54 ` ebotcazou at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-01-05 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Exactly why I marked this as blocker. There is no workaround. -gnat2012 will
> not compile properly, plain and simple. Adding "out" to a parameter of a
> function results in this error. Stepping back to -gnat2005 is not a
> workaround, it's moving to a different language; it's a less severe form of
> moving from, say Ada to ALGOL.

I'm sure there is a simple workaround though, like turning the function into a
procedure.  Blocker really means blocker.

> I disagree with this being a duplicate, as the problem in that report, which
> I read prior to filing this one, is an issue with pragmas behavior, while
> this is with "out" parameters of functions; these are not the same thing.
> Two different issues are reporting the same error message; the error message
> is what is common, not the error.

Then please avoid confusing the matter by writing "I've faced an almost
identical problem" and providing no way for anyone to reproduce your problem. 
Until we can reproduce it, we'll treat this PR as a duplicate of the other.

*** This bug has been marked as a duplicate of bug 58151 ***


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

* [Bug ada/59671] Improper Ada behavior under -gnat2012
  2014-01-03 21:34 [Bug ada/59671] New: Improper Ada behavior under -gnat2012 p-kell at live dot com
                   ` (2 preceding siblings ...)
  2014-01-05 22:03 ` ebotcazou at gcc dot gnu.org
@ 2014-01-06  6:54 ` ebotcazou at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-01-06  6:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> I thought I was clear of the steps needed to produce it. Compile, using the
> flags listed, with a function utilizing an "out" parameter. This would occur
> even in test packages, in which the function was the only member of the
> package.

Please read http://gcc.gnu.org/bugs if you haven't already done so.


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

end of thread, other threads:[~2014-01-06  6:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-03 21:34 [Bug ada/59671] New: Improper Ada behavior under -gnat2012 p-kell at live dot com
2014-01-04 18:26 ` [Bug ada/59671] " ebotcazou at gcc dot gnu.org
2014-01-05 18:24 ` p-kell at live dot com
2014-01-05 22:03 ` ebotcazou at gcc dot gnu.org
2014-01-06  6:54 ` ebotcazou 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).