public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug ada/34496] New: [4.2 regression] prefixed notation allows changing the value of a constant @ 2007-12-16 13:57 ludovic at ludovic-brenta dot org 2008-01-25 20:31 ` [Bug ada/34496] [4.2 Regression] " rguenth at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: ludovic at ludovic-brenta dot org @ 2007-12-16 13:57 UTC (permalink / raw) To: gcc-bugs with text_io; procedure test1 is package pak3 is type T1 is tagged record x0: integer; end record; procedure p1 (x1: access T1; val: integer); x2: aliased constant T1 := (x0 => 3); x3: access constant T1 := x2'access; end pak3; package body pak3 is procedure p1 (x1: access T1; val: integer) is begin x1.x0 := val; end p1; end pak3; begin text_io.put_line(integer'image(pak3.x2.x0)); pak3.x2.p1(5); -- line 25 text_io.put_line(integer'image(pak3.x2.x0)); pak3.x3.all.p1(7); -- line 27 -- pak3.x3.p1(7); -- this one is detected text_io.put_line(integer'image(pak3.x2.x0)); end test1; GCC 4.1.2: $ gnatmake -gnat05 test1 gcc-4.1 -c -gnat05 test1.adb test1.adb:25:08: expected an access type with designated type "T1" defined at line 5 test1.adb:25:08: found type "T1" defined at line 5 test1.adb:27:12: expected an access type with designated type "T1" defined at line 5 test1.adb:27:12: found type "T1" defined at line 5 The error messages are not very good (they should say something like "found type "constant T1"") but the program is indeed illegal. GCC 4.2.2: $ gnatmake -gnat05 test1 gcc-4.2 -c -gnat05 test1.adb gnatbind -x test1.ali gnatlink test1.ali $ ./test1 3 5 7 -- Summary: [4.2 regression] prefixed notation allows changing the value of a constant Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ludovic at ludovic-brenta dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34496 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/34496] [4.2 Regression] prefixed notation allows changing the value of a constant 2007-12-16 13:57 [Bug ada/34496] New: [4.2 regression] prefixed notation allows changing the value of a constant ludovic at ludovic-brenta dot org @ 2008-01-25 20:31 ` rguenth at gcc dot gnu dot org 2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu dot org @ 2008-01-25 20:31 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from rguenth at gcc dot gnu dot org 2008-01-25 20:27 ------- Regressions should have a target-milestone, Ada is not release critical. Does this bug still happen on the trunk? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Known to work| |4.1.2 Priority|P3 |P4 Summary|[4.2 regression] prefixed |[4.2 Regression] prefixed |notation allows changing the|notation allows changing the |value of a constant |value of a constant Target Milestone|--- |4.2.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34496 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/34496] [4.2 Regression] prefixed notation allows changing the value of a constant 2007-12-16 13:57 [Bug ada/34496] New: [4.2 regression] prefixed notation allows changing the value of a constant ludovic at ludovic-brenta dot org 2008-01-25 20:31 ` [Bug ada/34496] [4.2 Regression] " rguenth at gcc dot gnu dot org @ 2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org 2008-03-20 1:02 ` [Bug ada/34496] [4.2/4.3 " ludovic at ludovic-brenta dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:02 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from jsm28 at gcc dot gnu dot org 2008-02-01 16:55 ------- 4.2.3 is being released now, changing milestones of open bugs to 4.2.4. -- jsm28 at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.2.3 |4.2.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34496 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/34496] [4.2/4.3 Regression] prefixed notation allows changing the value of a constant 2007-12-16 13:57 [Bug ada/34496] New: [4.2 regression] prefixed notation allows changing the value of a constant ludovic at ludovic-brenta dot org 2008-01-25 20:31 ` [Bug ada/34496] [4.2 Regression] " rguenth at gcc dot gnu dot org 2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org @ 2008-03-20 1:02 ` ludovic at ludovic-brenta dot org 2008-05-09 9:49 ` sam at gcc dot gnu dot org 2008-05-09 13:18 ` andreasmeier80 at gmx dot de 4 siblings, 0 replies; 6+ messages in thread From: ludovic at ludovic-brenta dot org @ 2008-03-20 1:02 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from ludovic at ludovic-brenta dot org 2008-03-20 01:01 ------- Still present in 4.3.0: $ gnatmake -gnat05 test1 gcc-4.3 -c -gnat05 test1.adb gnatbind -x test1.ali gnatlink test1.ali $ ./test1 3 raised STORAGE_ERROR : stack overflow (or erroneous memory access) I am not concerned about the stack overflow because the program is illegal anyway. -- ludovic at ludovic-brenta dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |UNCONFIRMED Known to fail| |4.2.2 4.3.0 Summary|[4.2 Regression] prefixed |[4.2/4.3 Regression] |notation allows changing the|prefixed notation allows |value of a constant |changing the value of a | |constant http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34496 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/34496] [4.2/4.3 Regression] prefixed notation allows changing the value of a constant 2007-12-16 13:57 [Bug ada/34496] New: [4.2 regression] prefixed notation allows changing the value of a constant ludovic at ludovic-brenta dot org ` (2 preceding siblings ...) 2008-03-20 1:02 ` [Bug ada/34496] [4.2/4.3 " ludovic at ludovic-brenta dot org @ 2008-05-09 9:49 ` sam at gcc dot gnu dot org 2008-05-09 13:18 ` andreasmeier80 at gmx dot de 4 siblings, 0 replies; 6+ messages in thread From: sam at gcc dot gnu dot org @ 2008-05-09 9:49 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from sam at gcc dot gnu dot org 2008-05-09 09:48 ------- This appears to be fixed in SVN trunk: 25. pak3.x2.p1(5); -- line 25 | >>> actual for "x1" must be a variable 27. pak3.x3.all.p1(7); -- line 27 | >>> actual for "x1" must be a variable -- sam at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Target Milestone|4.2.4 |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34496 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/34496] [4.2/4.3 Regression] prefixed notation allows changing the value of a constant 2007-12-16 13:57 [Bug ada/34496] New: [4.2 regression] prefixed notation allows changing the value of a constant ludovic at ludovic-brenta dot org ` (3 preceding siblings ...) 2008-05-09 9:49 ` sam at gcc dot gnu dot org @ 2008-05-09 13:18 ` andreasmeier80 at gmx dot de 4 siblings, 0 replies; 6+ messages in thread From: andreasmeier80 at gmx dot de @ 2008-05-09 13:18 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from andreasmeier80 at gmx dot de 2008-05-09 13:18 ------- Perhaps it is a good idea to add the testcase to the testsuite -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34496 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-09 13:18 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-12-16 13:57 [Bug ada/34496] New: [4.2 regression] prefixed notation allows changing the value of a constant ludovic at ludovic-brenta dot org 2008-01-25 20:31 ` [Bug ada/34496] [4.2 Regression] " rguenth at gcc dot gnu dot org 2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org 2008-03-20 1:02 ` [Bug ada/34496] [4.2/4.3 " ludovic at ludovic-brenta dot org 2008-05-09 9:49 ` sam at gcc dot gnu dot org 2008-05-09 13:18 ` andreasmeier80 at gmx dot de
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).