public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error
@ 2013-08-14  8:16 prosfilaes at gmail dot com
  2013-08-21  1:09 ` [Bug ada/58151] " anhvofrcaus at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: prosfilaes at gmail dot com @ 2013-08-14  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58151
           Summary: "conflict of writable function parameter in construct
                    with arbitrary order of evaluation" is often a
                    spurious error
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: prosfilaes at gmail dot com

Created attachment 30651
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30651&action=edit
Code that shows the error message unless you comment out calculations.adb:21

Compiling the attached code with "gnatmake -gnat2012 solver.adb" gives me

gcc -c -gnat2012 solver.adb
gcc -c -gnat2012 calculations.adb
calculations.adb:21:25: "Is_Route" is undefined
calculations.adb:80:58: conflict of writable function parameter in construct
with arbitrary order of evaluation
calculations.adb:81:58: conflict of writable function parameter in construct
with arbitrary order of evaluation
gnatmake: "calculations.adb" compilation error

"Is_Route" is undefined is quite correct. So comment out that pragma Assert on
line 21. Then gnatmake -gnat2012 solver.adb gives me

gcc -c -gnat2012 calculations.adb
calculations.adb:60:07: warning: variable "Length" is never read and never
assigned
calculations.adb:62:07: warning: variable "Optimal" is never read and never
assigned
gcc -c -gnat2012 problem.adb
gnatbind -x solver.ali
gnatlink solver.ali

Suddenly those lines of code on lines 80 and 81 are not a problem.

This is not something special to this chunk of code; I've been getting this
repeatedly when working in Ada2012 mode, where "conflict of writable function
parameter in construct with arbitrary order of evaluation" goes away after a
fix of a completely different error in a completely different part of the file.


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

* [Bug ada/58151] "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error
  2013-08-14  8:16 [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error prosfilaes at gmail dot com
@ 2013-08-21  1:09 ` anhvofrcaus at gmail dot com
  2013-08-21  1:44 ` prosfilaes at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: anhvofrcaus at gmail dot com @ 2013-08-21  1:09 UTC (permalink / raw)
  To: gcc-bugs

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

Anh Vo <anhvofrcaus at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anhvofrcaus at gmail dot com

--- Comment #1 from Anh Vo <anhvofrcaus at gmail dot com> ---
Based on this code, lines 80 and 81 are perfectly fine. 

What problem do you expect from these two lines?


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

* [Bug ada/58151] "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error
  2013-08-14  8:16 [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error prosfilaes at gmail dot com
  2013-08-21  1:09 ` [Bug ada/58151] " anhvofrcaus at gmail dot com
@ 2013-08-21  1:44 ` prosfilaes at gmail dot com
  2014-01-03 21:27 ` p-kell at live dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: prosfilaes at gmail dot com @ 2013-08-21  1:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Starner <prosfilaes at gmail dot com> ---
I don't expect any problem from those lines. But it's giving me an error
message on those lines when there's an error on an unrelated line. Comment that
unrelated line out, and then it gives no error on 80 and 81.

If 80 and 81 are fine, then it shouldn't be giving an error on them.


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

* [Bug ada/58151] "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error
  2013-08-14  8:16 [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error prosfilaes at gmail dot com
  2013-08-21  1:09 ` [Bug ada/58151] " anhvofrcaus at gmail dot com
  2013-08-21  1:44 ` prosfilaes at gmail dot com
@ 2014-01-03 21:27 ` p-kell at live dot com
  2014-01-04 18:26 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: p-kell at live dot com @ 2014-01-03 21:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p-kell at live dot com

--- Comment #3 from Patrick Kelly <p-kell at live dot com> ---
I've faced an almost identical problem. Compilation under -gnat2012 fails with
this error. 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. The current behavior is not following the ARM2012. Occurred on GCC
4.8.2.


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

* [Bug ada/58151] "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error
  2013-08-14  8:16 [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error prosfilaes at gmail dot com
                   ` (2 preceding siblings ...)
  2014-01-03 21:27 ` p-kell at live dot com
@ 2014-01-04 18:26 ` ebotcazou at gcc dot gnu.org
  2014-01-04 18:38 ` ebotcazou at gcc dot gnu.org
  2014-01-05 22:03 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ 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=58151

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
*** Bug 59671 has been marked as a duplicate of this bug. ***


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

* [Bug ada/58151] "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error
  2013-08-14  8:16 [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error prosfilaes at gmail dot com
                   ` (3 preceding siblings ...)
  2014-01-04 18:26 ` ebotcazou at gcc dot gnu.org
@ 2014-01-04 18:38 ` ebotcazou at gcc dot gnu.org
  2014-01-05 22:03 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-01-04 18:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-04
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Error recovery issue here, but the issue might be deeper.


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

* [Bug ada/58151] "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error
  2013-08-14  8:16 [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error prosfilaes at gmail dot com
                   ` (4 preceding siblings ...)
  2014-01-04 18:38 ` ebotcazou at gcc dot gnu.org
@ 2014-01-05 22:03 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ 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=58151

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
*** Bug 59671 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2014-01-05 22:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14  8:16 [Bug ada/58151] New: "conflict of writable function parameter in construct with arbitrary order of evaluation" is often a spurious error prosfilaes at gmail dot com
2013-08-21  1:09 ` [Bug ada/58151] " anhvofrcaus at gmail dot com
2013-08-21  1:44 ` prosfilaes at gmail dot com
2014-01-03 21:27 ` p-kell at live dot com
2014-01-04 18:26 ` ebotcazou at gcc dot gnu.org
2014-01-04 18:38 ` ebotcazou at gcc dot gnu.org
2014-01-05 22:03 ` 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).