[Bug ada/42948] Generic instantiation inside protected object bug box

2010-02-03 Thread gcc at coreland dot ath dot cx


--- Comment #3 from gcc at coreland dot ath dot cx  2010-02-03 20:29 ---
A GNAT Pro customer I speak to says:

main.adb:20:07: instantiation error at ng.adb:6
main.adb:20:07: missing argument for parameter "_Object" in call to "Show_N"
(inherited) at line 14


-- 


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



[Bug ada/42948] Generic instantiation inside protected object bug box

2010-02-03 Thread gcc at coreland dot ath dot cx


--- Comment #2 from gcc at coreland dot ath dot cx  2010-02-03 20:28 ---
+===GNAT BUG DETECTED==+
| 4.5.0 20090514 (experimental) (i686-pc-linux-gnu) Assert_Failure
exp_ch6.adb:4603|
| Error detected at ng.adb:6:7 [main.adb:20:7] |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

main.adb
ng.ads
ng.adb


-- 


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



[Bug ada/42948] Generic instantiation inside protected object bug box

2010-02-03 Thread gcc at coreland dot ath dot cx


--- Comment #1 from gcc at coreland dot ath dot cx  2010-02-03 20:24 ---
Created an attachment (id=19798)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19798&action=view)
Repro


-- 


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



[Bug ada/42948] New: Generic instantiation inside protected object bug box

2010-02-03 Thread gcc at coreland dot ath dot cx
$ gnatchop blob.adb
$ gnatmake main
+===GNAT BUG DETECTED==+
| 4.4.2 (i486-pc-linux-gnu) Assert_Failure exp_ch6.adb:4602|
| Error detected at ng.adb:6:7 [main.adb:20:7] |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc-4.4 or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

main.adb
ng.ads
list may be incomplete
compilation abandoned
gnatmake: "main.adb" compilation error


-- 
   Summary: Generic instantiation inside protected object bug box
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at coreland dot ath dot cx
  GCC host triplet: i486-pc-linux-gnu, x86_64-unknown-freebsd8.0


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



[Bug ada/42816] Crash in Ada.Containers.Vectors.Update_Element

2010-01-21 Thread gcc at coreland dot ath dot cx


--- Comment #4 from gcc at coreland dot ath dot cx  2010-01-21 08:51 ---
Created an attachment (id=19676)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19676&action=view)
Even simpler

Some experimentation has determined that the protected object isn't even
necessary to cause the crash.


-- 

gcc at coreland dot ath dot cx changed:

   What|Removed |Added

  Attachment #19675|0   |1
is obsolete||


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



[Bug ada/42816] Crash in Ada.Containers.Vectors.Update_Element

2010-01-21 Thread gcc at coreland dot ath dot cx


--- Comment #3 from gcc at coreland dot ath dot cx  2010-01-21 08:29 ---
Created an attachment (id=19675)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19675&action=view)
Simpler repro

As usual, here's a smaller repro that provokes the same crash.


-- 


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



[Bug ada/42816] Crash in Ada.Containers.Vectors.Update_Element

2010-01-20 Thread gcc at coreland dot ath dot cx


--- Comment #1 from gcc at coreland dot ath dot cx  2010-01-20 21:24 ---
Created an attachment (id=19668)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19668&action=view)
Repro


-- 


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



[Bug ada/42816] New: Crash in Ada.Containers.Vectors.Update_Element

2010-01-20 Thread gcc at coreland dot ath dot cx
See the attached world_test_main program.

This was taken from a working program with as much code removed as possible.

$ gnatchop blob.adb
$ gnatmake world_test_main
$ ./world_test_main
test_tasks(1)_000800A50500: waiting to initialize
world_task_000800A0B700: running
main_task_000800A0AA00: initializing tasks
test_tasks(1)_000800A50500: initialized
test_tasks(1)_000800A50500: logged in
test_tasks(1)_000800A50500: fetching messages

raised STORAGE_ERROR : s-intman.adb:139 explicit raise

Running in gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x7f9fd9e8 in ?? ()
(gdb) bt
#0  0x7f9fd9e8 in ?? ()
#1  0x0040e3fa in world.player_sessions.update_element (container=...,
position=..., process=0x7f9fd9e8)
at
/storage/volatile/gnat_build/builds/8.0/x86_64/svn-r155934/lib/gcc/x86_64-unknown-freebsd8.0/4.5.0/adainclude/a-cohama.adb:853
#2  0x0040f6f8 in world.world_state.player_fetch_messages
(<_object>=..., name=..., messages=...)
at world.adb:67
#3  0x0040f767 in 
(name=..., messages=...) at world.adb:49
#4  0x0040f9ad in world.fetch_messages (name=..., messages=...) at
world.adb:114
#5  0x0041176a in  (<_task>=0x55bda0) at
world_test.adb:50
#6  0x00419260 in system.tasking.stages.task_wrapper
(self_id=0x800a50500) at s-tassta.adb:1188
#7  0x0008006974b1 in ?? () from /lib/libthr.so.3
#8  0x in ?? ()
(gdb) up
#1  0x0040e3fa in world.player_sessions.update_element (container=...,
position=..., process=0x7f9fd9e8)
at
/gnat/builds/8.0/x86_64/svn-r155934/lib/gcc/x86_64-unknown-freebsd8.0/4.5.0/adainclude/a-cohama.adb:853
853 Process (K, E);
(gdb) print Process
$1 = (access procedure (a1: world.player_sessions.key_typeX; a2: 
world.queue.vector)) 0x7f9fd9e8

This looks like it could possibly be a code generation error. The access to
Process seems to be invalid:

$ gdb world_test_main
(gdb) b world.adb:62
Breakpoint 1 at 0x40f6cf: file world.adb, line 62.
(gdb) r
Starting program:
/storage/home/m0/doc/dev/2010/01/another_gnat_bug2/test/world_test_main 
test_tasks(1)_000800A50500: waiting to initialize
world_task_000800A0B700: running
main_task_000800A0AA00: initializing tasks
test_tasks(1)_000800A50500: initialized
test_tasks(1)_000800A50500: logged in
test_tasks(1)_000800A50500: fetching messages

Breakpoint 1, world.world_state.player_fetch_messages (<_object>=..., name=...,
messages=...) at world.adb:67
67Player_Sessions.Update_Element
(gdb) s
world.player_sessions.update_element (container=..., position=...,
process=0x7f9fd9e8)
at
/storage/volatile/gnat_build/builds/8.0/x86_64/svn-r155934/lib/gcc/x86_64-unknown-freebsd8.0/4.5.0/adainclude/a-cohama.adb:827
827   if Position.Node = null then
(gdb) s
832   if Position.Container /= Container'Unrestricted_Access then
(gdb) s
world_task_000800A0B700845   B := B + 1;
(gdb) s
: running846 L := L + 1;
(gdb) s

849 K : Key_Type renames Position.Node.Key;
(gdb) s
850 E : Element_Type renames Position.Node.Element;
(gdb) s
853 Process (K, E);
(gdb) s

Program received signal SIGSEGV, Segmentation fault.
0x7f9fd9e8 in ?? ()

I've tested with every build of GCC I have from 4.4.0 to SVN r155934 on both
x86 and x86_64 and the point of failure is identical each time.


-- 
   Summary: Crash in Ada.Containers.Vectors.Update_Element
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: gcc at coreland dot ath dot cx
  GCC host triplet: x86_64-unknown-freebsd8.0


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2010-01-18 Thread gcc at coreland dot ath dot cx


--- Comment #24 from gcc at coreland dot ath dot cx  2010-01-18 22:53 
---
Created an attachment (id=19653)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19653&action=view)
A smaller repro for the "_master conflicts with declaration" error

$ gnatmake arc_dir_003.adb
gcc -c arc_dir_003.adb
arc_dir_003.adb:29:26: "_master" conflicts with declaration at line 30
gnatmake: "arc_dir_003.adb" compilation error


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2010-01-18 Thread gcc at coreland dot ath dot cx


--- Comment #23 from gcc at coreland dot ath dot cx  2010-01-18 22:51 
---
Created an attachment (id=19652)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19652&action=view)
Another repro

A smaller, simpler piece of code that triggers this:

$ gnatmake p.adb
p.adb:8:70: wrong type for return_subtype_indication
gnatmake: "p.adb" compilation error


-- 


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



[Bug ada/42793] Bug box when using generic package

2010-01-18 Thread gcc at coreland dot ath dot cx


--- Comment #3 from gcc at coreland dot ath dot cx  2010-01-18 22:46 ---
Created an attachment (id=19651)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19651&action=view)
Another repro

This appears to be the same bug but giving a slightly more interesting
crash message:

$ gnatchop proto1.adb
$ gnatmake proto1.adb
+===GNAT BUG DETECTED==+
| 4.4.0 (x86_64-unknown-freebsd8.0) GCC error: |
| in simplify_subreg, at simplify-rtx.c:4954   |
| Error detected around protocol.adb:4 |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

list may be incomplete

raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:424
gnatmake: "protocol.adb" compilation error


-- 


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



[Bug ada/42793] Bug box when using generic package

2010-01-18 Thread gcc at coreland dot ath dot cx


--- Comment #2 from gcc at coreland dot ath dot cx  2010-01-18 18:14 ---
Created an attachment (id=19648)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19648&action=view)
Repro case


-- 


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



[Bug ada/42793] Bug box when using generic package

2010-01-18 Thread gcc at coreland dot ath dot cx


--- Comment #1 from gcc at coreland dot ath dot cx  2010-01-18 18:13 ---
I'm attempting to submit the repro case as an attachment but bugzilla keeps
suffering internal errors. Admin contacted...


-- 


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



[Bug ada/42793] New: Bug box when using generic package

2010-01-18 Thread gcc at coreland dot ath dot cx
$ gnatchop unchopped.adb
$ gnatmake protocol.adb

+===GNAT BUG DETECTED==+
| 4.4.0 (x86_64-unknown-freebsd8.0) Storage_Error stack overflow or erroneous
memory access|
| Error detected at serial_io.adb:560:3 [protocol.ads:32:3]|
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

protocol.adb
protocol.ads
serial_io.ads
serial_io.adb

compilation abandoned
gnatmake: "protocol.adb" compilation error


It crashes every version of GNAT that I can find on any platform.
Unfortunately, I struggled to even write a summary line as I'm not sure what's
wrong with the
'Serializable_Enumeration' package.


-- 
   Summary: Bug box when using generic package
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: gcc at coreland dot ath dot cx
  GCC host triplet: x86_64-unknown-freebsd8.0, i486-pc-linux-gnu


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



[Bug ada/42168] GNAT bug box with invalid anonymous access declaration

2009-11-24 Thread gcc at coreland dot ath dot cx


--- Comment #2 from gcc at coreland dot ath dot cx  2009-11-24 20:21 ---
Created an attachment (id=19113)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19113&action=view)
Assertion failure with with_clause removed.


-- 


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



[Bug ada/42168] GNAT bug box with invalid anonymous access declaration

2009-11-24 Thread gcc at coreland dot ath dot cx


--- Comment #1 from gcc at coreland dot ath dot cx  2009-11-24 20:20 ---
Created an attachment (id=19112)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19112&action=view)
case 1


-- 


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



[Bug ada/42168] New: GNAT bug box with invalid anonymous access declaration

2009-11-24 Thread gcc at coreland dot ath dot cx
cc version 4.4.0 (GCC) 

Using built-in specs.
COLLECT_GCC=/gnat/svn/builds/r154285/bin/gcc-r154285
COLLECT_LTO_WRAPPER=/gnat/svn/builds/r154285/libexec/gcc/x86_64-unknown-freebsd7.2/4.5.0/lto-wrapper
Target: x86_64-unknown-freebsd7.2
Configured with: /gnat/svn/src/configure --enable-languages=c,c++,ada,fortran
--prefix=/gnat/svn/builds/r154285 --with-system-zlib --disable-nls
--program-suffix=-r154285 --enable-libstdcxx-debug
Thread model: posix
gcc version 4.5.0 20091118 (experimental) (GCC)


-- 
   Summary: GNAT bug box with invalid anonymous access declaration
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: gcc at coreland dot ath dot cx
  GCC host triplet: x86_64-portbld-freebsd7.2


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #22 from gcc at coreland dot ath dot cx  2009-11-23 11:13 
---
Any way I can remove the above attachments?


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #21 from gcc at coreland dot ath dot cx  2009-11-23 11:12 
---
Created an attachment (id=19103)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19103&action=view)
version suitable for gnatchop


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #19 from gcc at coreland dot ath dot cx  2009-11-23 10:22 
---
Really fail to see how this is more convenient or useful for anyone involved
but oh well, what do I know?

gcc-4.4.0:

gcc -c pfseudo.ads pfseudo-path.adb pfseudo-archiver.ads
pfseudo-archiver-directory.adb test.adb arc_dir_003.adb

pfseudo-archiver-directory.adb:24:41: wrong type for return_subtype_indication
pfseudo-archiver-directory.adb:46:35: wrong type for return_subtype_indication
arc_dir_003.adb:25:32: "_master" conflicts with declaration at line 21

gcc-r154285:

gcc-r154285 -c pfseudo.ads pfseudo-path.adb pfseudo-archiver.ads
pfseudo-archiver-directory.adb test.adb arc_dir_003.adb

arc_dir_003.adb:25:32: "_master" conflicts with declaration at line 21


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #18 from gcc at coreland dot ath dot cx  2009-11-23 10:20 
---
Created an attachment (id=19102)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19102&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #17 from gcc at coreland dot ath dot cx  2009-11-23 10:19 
---
Created an attachment (id=19101)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19101&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #16 from gcc at coreland dot ath dot cx  2009-11-23 10:19 
---
Created an attachment (id=19100)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19100&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #15 from gcc at coreland dot ath dot cx  2009-11-23 10:19 
---
Created an attachment (id=19099)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19099&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #14 from gcc at coreland dot ath dot cx  2009-11-23 10:19 
---
Created an attachment (id=19098)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19098&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #13 from gcc at coreland dot ath dot cx  2009-11-23 10:18 
---
Created an attachment (id=19097)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19097&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #12 from gcc at coreland dot ath dot cx  2009-11-23 10:18 
---
Created an attachment (id=19096)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19096&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #11 from gcc at coreland dot ath dot cx  2009-11-23 10:18 
---
Created an attachment (id=19095)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19095&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #10 from gcc at coreland dot ath dot cx  2009-11-23 10:17 
---
Created an attachment (id=19094)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19094&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #9 from gcc at coreland dot ath dot cx  2009-11-23 10:17 ---
Created an attachment (id=19093)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19093&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #8 from gcc at coreland dot ath dot cx  2009-11-23 10:17 ---
Created an attachment (id=19092)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19092&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #7 from gcc at coreland dot ath dot cx  2009-11-23 10:17 ---
Created an attachment (id=19091)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19091&action=view)
dependency for arc_dir_003.adb


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #6 from gcc at coreland dot ath dot cx  2009-11-23 10:16 ---
Created an attachment (id=19090)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19090&action=view)
source file that generates the error


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #4 from gcc at coreland dot ath dot cx  2009-11-23 08:16 ---
Using built-in specs.
COLLECT_GCC=/gnat/svn/builds/r154285/bin/gcc-r154285
COLLECT_LTO_WRAPPER=/gnat/svn/builds/r154285/libexec/gcc/x86_64-unknown-freebsd7.2/4.5.0/lto-wrapper
Target: x86_64-unknown-freebsd7.2
Configured with: /gnat/svn/src/configure --enable-languages=c,c++,ada,fortran
--prefix=/gnat/svn/builds/r154285 --with-system-zlib --disable-nls
--program-suffix=-r154285 --enable-libstdcxx-debug
Thread model: posix
gcc version 4.5.0 20091118 (experimental) (GCC) 


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-23 Thread gcc at coreland dot ath dot cx


--- Comment #3 from gcc at coreland dot ath dot cx  2009-11-23 08:15 ---
Using built-in specs.
Target: x86_64-portbld-freebsd7.2
Configured with: ./..//gcc-4.4.0/configure --enable-languages=c,ada
--disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local
--program-suffix=44 --bindir=/usr/local/bin/gcc44
--libdir=/usr/local/lib/gcc-4.4.0 --prefix=/usr/local --mandir=/usr/local/man
--infodir=/usr/local/info/gcc44 --build=x86_64-portbld-freebsd7.2
Thread model: posix
gcc version 4.4.0 (GCC) 

FreeBSD viper.internal.network 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri
Oct  2 08:22:32 UTC 2009
r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


-- 


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



[Bug ada/42150] GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-22 Thread gcc at coreland dot ath dot cx


--- Comment #2 from gcc at coreland dot ath dot cx  2009-11-22 19:11 ---
Files here:

http://coreland.ath.cx/tmp/pfseudo_bug.tar.gz

Edit build.sh to point $GCC to whatever's sensible.

Output here:

$ ./build.sh
+ GCC=/gnat/svn/builds/r154285/bin/gcc-r154285
+ /gnat/svn/builds/r154285/bin/gcc-r154285 -c pfseudo.ads
+ /gnat/svn/builds/r154285/bin/gcc-r154285 -c pfseudo-path.adb
+ /gnat/svn/builds/r154285/bin/gcc-r154285 -c pfseudo-archiver.ads
+ /gnat/svn/builds/r154285/bin/gcc-r154285 -c pfseudo-archiver-directory.adb
+ /gnat/svn/builds/r154285/bin/gcc-r154285 -c test.adb
+ /gnat/svn/builds/r154285/bin/gcc-r154285 -c arc_dir_003.adb
arc_dir_003.adb:25:32: "_master" conflicts with declaration at line 21


-- 


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



[Bug ada/42150] New: GNAT (really) appears to misbehave with limited types/finalization/extended return

2009-11-22 Thread gcc at coreland dot ath dot cx
I'm working on a small project to create an abstraction over directories
and archives. I've managed to write some code that seems simple enough
(using tagged limited types) and even though the code appears to be valid,
it seems to either trigger bugs in the runtime (causing crashes on execution)
or fails to compile:

Both Debian GCC 4.3, GNAT GPL 2009 and FreeBSD GCC 4.4 fail with the following:

  pfseudo-archiver-directory.adb:24:41: wrong type for
return_subtype_indication
  pfseudo-archiver-directory.adb:46:35: wrong type for
return_subtype_indication

GCC SVN (r154285) fails to build with a strange error:

  arc_dir_003.adb:25:32: "_master" conflicts with declaration at line 21

The output of -gnatG shows this error to be apparently incorrect:

   error := false;
   B_1 : declare
  _master : constant integer := system__soft_links__current_master.all;
  A6bM : integer renames _master;
  type A6b is access all pfseudo__archiver__Tarchive_tC;
  R7b : A6b := pfseudo__archiver__directory.

The code is available here:

  http://git.coreland.ath.cx/gitweb.cgi?p=pfseudo/.git;a=summary
  $ git clone http://git.coreland.ath.cx/pfseudo/.git

Configure and build with:

  $ echo 'gcc'  > conf-adacomp
  $ echo 'gnatbind' > conf-adabind
  $ echo 'gnatlink' > conf-adalink
  $ make
  $ make tests


-- 
   Summary: GNAT (really) appears to misbehave with limited
types/finalization/extended return
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at coreland dot ath dot cx
  GCC host triplet: x86_64-portbld-freebsd7.2, i686-pc-linux-gnu


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



[Bug ada/42140] GNAT appears to misbehave with limited tagged types and possibly finalization

2009-11-22 Thread gcc at coreland dot ath dot cx


--- Comment #5 from gcc at coreland dot ath dot cx  2009-11-22 18:37 ---
Closing this bug as the discussion has become confused between
two separate issues, one of them apparently invalid.


-- 

gcc at coreland dot ath dot cx changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug ada/42140] GNAT appears to misbehave with limited tagged types and possibly finalization

2009-11-22 Thread gcc at coreland dot ath dot cx


--- Comment #4 from gcc at coreland dot ath dot cx  2009-11-22 17:10 ---
Quiet you.

My code might be a lot better if I didn't create dangling references
in the second example.

I think the short example is basically just broken code and entirely
my fault. The code linked to in the git repository isn't, however.


-- 


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



[Bug ada/42140] GNAT appears to misbehave with limited tagged types and possibly finalization

2009-11-22 Thread gcc at coreland dot ath dot cx


--- Comment #2 from gcc at coreland dot ath dot cx  2009-11-22 16:41 ---
A couple of people have commented on the anonymous access type
(claiming it causes the crash). Here's a version with it removed
and a gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
system.finalization_implementation.move_final_list (from=0x800a02040, to=0x0)
at s-finimp.adb:486
486 s-finimp.adb: No such file or directory.
in s-finimp.adb
(gdb) bt
#0  system.finalization_implementation.move_final_list (from=0x800a02040,
to=0x0) at s-finimp.adb:486
#1  0x00402cfb in archiver.open_archive (archiver=(), path=0x41fe18,
=4324888, 
=0x0, =0x7fffe6d8) at
archiver.adb:9
#2  0x00402e9f in main () at main.adb:9

Probably advisable to add an assertion in Move_Final_List
to ensure that 'To' is not null.

-- %< archiver.ads

with Ada.Finalization;
with Ada.Streams.Stream_IO;

package Archiver is

  type Archiver_t is tagged limited private;
  type Archive_t  is tagged limited private;

  function Open_Archive
(Archiver : in Archiver_t;
 Path : in String) return Archive_t'Class;

  function Stream
(Archive : in Archive_t)
  return Ada.Streams.Stream_IO.Stream_Access;

private
  package Stream_IO renames Ada.Streams.Stream_IO;

  type Archiver_t is tagged limited null record;

  type Archive_t is new Ada.Finalization.Limited_Controlled with record
File : Stream_IO.File_Type;
  end record;

end Archiver;

-- %< archiver.adb

package body Archiver is

  function Open_Archive
(Archiver : in Archiver_t;
 Path : in String) return Archive_t'Class
  is
pragma Unreferenced (Archiver);
  begin
return A : Archive_t'Class :=
Archive_t'(Ada.Finalization.Limited_Controlled with others => <>) do
  Stream_IO.Open
(Name => Path,
 File => A.File,
 Mode => Stream_IO.In_File);
end return;
  end Open_Archive;

  function Stream
(Archive : in Archive_t)
  return Ada.Streams.Stream_IO.Stream_Access is
  begin
return Stream_IO.Stream (Archive.File);
  end Stream;

end Archiver;

-- %< main.adb

with Ada.Text_IO;
with Ada.Streams.Stream_IO;
with Archiver;

procedure Main is

  A : Archiver.Archiver_t;
  S : constant Ada.Streams.Stream_IO.Stream_Access := Archiver.Stream
(Archiver.Open_Archive (A, "file.zip"));
  X : Integer;

begin
  X := Integer'Input (S);

  Ada.Text_IO.Put_Line (Integer'Image (X));
end Main;


-- 


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



[Bug ada/42141] New: ACATS C9A009G failure

2009-11-22 Thread gcc at coreland dot ath dot cx
Version was marked as 4.5.0 but is really SVN r154285.

Currently, C9A009G seems to be failing due to a segmentation fault.

Other tests failed in the last build at:

http://gcc.coreland.ath.cx/r154285_2009-11-18_103532/

...but this appeared to be the simplest.

A backtrace from gdb:

(gdb) r
Starting program: /gnat/svn/obj/c9a009g 
[New LWP 100782]
[New Thread 0x800a020b0 (LWP 100782)]
[New Thread 0x800a02240 (LWP 100608)]

,.,. C9A009G ACATS 2.5 09-11-22 11:15:41
 C9A009G MASTER COMPLETED BUT NOT TERMINATED.
[New Thread 0x800a023d0 (LWP 101454)]
[New Thread 0x800b0b0b0 (LWP 101455)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x800b0b0b0 (LWP 101455)]
0x7f9fdb69 in ?? ()
(gdb) bt
#0  0x7f9fdb69 in ?? ()
#1  0x0040f600 in system__tasking__stages__task_wrapper
(self_id=0x800b04000) at s-tassta.adb:1190
#2  0x0008006774d1 in pthread_getprio () from /lib/libthr.so.3
#3  0x in ?? ()
Error accessing memory address 0x7f7fd000: Bad address.

Stepping through the code with the following breakpoints:

Num Type   Disp Enb AddressWhat
1   breakpoint keep y0x00407559
breakpoint already hit 3 times
1.1 y 0x00407559 in c9a009g at
c9a009g.adb:34
1.2 y 0x00407559 in c9a009g at
c9a009g.adb:34
1.3 y 0x00407609 in c9a009g at
c9a009g.adb:34
2   breakpoint keep y   0x0040f485 in
system.tasking.stages.task_wrapper at s-tassta.adb:1006
breakpoint already hit 3 times

Got me as far as:

Breakpoint 2, system.tasking.stages.task_wrapper (self_id=0x800b04000) at
s-tassta.adb:1006
...
1190 Self_ID.Common.Task_Entry_Point (Self_ID.Common.Task_Arg);

The next step caused the program to segfault.


-- 
   Summary: ACATS C9A009G failure
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at coreland dot ath dot cx
  GCC host triplet: x86_64-unknown-freebsd7.2


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



[Bug ada/42140] GNAT appears to misbehave with limited tagged types and possibly finalization

2009-11-21 Thread gcc at coreland dot ath dot cx


--- Comment #1 from gcc at coreland dot ath dot cx  2009-11-22 05:27 ---
By "causes a crash" above, I meant that the generated code crashes at
the highlighted line.


-- 


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



[Bug ada/42140] New: GNAT appears to misbehave with limited tagged types and possibly finalization

2009-11-21 Thread gcc at coreland dot ath dot cx
I'm working on a small project to create an abstraction over directories
and archives. I've managed to write some code that seems simple enough
(using tagged limited types) and even though the code appears to be valid,
it seems to either trigger bugs in the runtime (causing crashes on execution)
or fails to compile:

Both Debian GCC 4.3, GNAT GPL 2009 and FreeBSD GCC 4.4 fail with the following:

  pfseudo-archiver-directory.adb:24:41: wrong type for
return_subtype_indication
  pfseudo-archiver-directory.adb:46:35: wrong type for
return_subtype_indication

GCC SVN (r154285) fails to build with a strange error:

  arc_dir_003.adb:25:32: "_master" conflicts with declaration at line 21

The output of -gnatG shows this error to be apparently incorrect:

   error := false;
   B_1 : declare
  _master : constant integer := system__soft_links__current_master.all;
  A6bM : integer renames _master;
  type A6b is access all pfseudo__archiver__Tarchive_tC;
  R7b : A6b := pfseudo__archiver__directory.

The code is available here:

  http://git.coreland.ath.cx/gitweb.cgi?p=pfseudo/.git;a=summary
  $ git clone http://git.coreland.ath.cx/pfseudo/.git

Configure and build with:

  $ echo 'gcc'  > conf-adacomp
  $ echo 'gnatbind' > conf-adabind
  $ echo 'gnatlink' > conf-adalink
  $ make
  $ make tests

Here's another case from a prototype that causes a crash on GCC 4.4
but, ironically, gives every impression of compiling and running
on earlier versions (4.3, GPL 2009):

with Ada.Streams.Stream_IO;
with Ada.Finalization;

package Archiver is

  type Archiver_t is tagged limited private;
  type Archive_t  is tagged limited private;

  function Open_Archive
(Archiver : in Archiver_t;
 Path : in String) return Archive_t'Class;

  function Stream
(Archive : in Archive_t)
  return Ada.Streams.Stream_IO.Stream_Access;

private
  package Stream_IO renames Ada.Streams.Stream_IO;

  type Archiver_t is tagged limited null record;

  type Archive_t is new Ada.Finalization.Limited_Controlled with record
Name : access String;
File : Stream_IO.File_Type;
  end record;

end Archiver;

package body Archiver is

  function Open_Archive
(Archiver : in Archiver_t;
 Path : in String) return Archive_t'Class
  is
pragma Unreferenced (Archiver);
  begin
-- This line causes a segmentation fault.
return A : Archive_t'Class :=
Archive_t'(Ada.Finalization.Limited_Controlled with others => <>) do
  A.Name := new String'(Path);
  Stream_IO.Open
(Name => A.Name.all,
 File => A.File,
 Mode => Stream_IO.In_File);
end return;
  end Open_Archive;

  function Stream
(Archive : in Archive_t)
  return Ada.Streams.Stream_IO.Stream_Access is
  begin
return Stream_IO.Stream (Archive.File);
  end Stream;

end Archiver;

with Ada.Text_IO;
with Ada.Streams.Stream_IO;
with Archiver;

procedure Main is

  A : Archiver.Archiver_t;
  S : constant Ada.Streams.Stream_IO.Stream_Access := Archiver.Stream
(Archiver.Open_Archive (A, "file.zip"));
  X : Integer;

begin
  X := Integer'Input (S);

  Ada.Text_IO.Put_Line (Integer'Image (X));
end Main;


-- 
   Summary: GNAT appears to misbehave with limited tagged types and
possibly finalization
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at coreland dot ath dot cx
  GCC host triplet: x86_64-portbld-freebsd7.2, i686-pc-linux-gnu


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



[Bug ada/40310] Patches for gcc 4.4.0 to support FreeBSD x86_64

2009-05-30 Thread gcc at coreland dot ath dot cx


--- Comment #3 from gcc at coreland dot ath dot cx  2009-05-30 15:03 ---
I've just noticed that I accidentally left in a "# PATCHED" comment
in the c8.diff patch. Anyone who commits this patch will probably
want to remove that.


-- 


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



[Bug ada/40310] Patches for gcc 4.4.0 to support FreeBSD x86_64

2009-05-30 Thread gcc at coreland dot ath dot cx


--- Comment #2 from gcc at coreland dot ath dot cx  2009-05-30 15:02 ---
Created an attachment (id=17938)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17938&action=view)
64 bit FreeBSD system package.


-- 


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



[Bug ada/40310] Patches for gcc 4.4.0 to support FreeBSD x86_64

2009-05-30 Thread gcc at coreland dot ath dot cx


--- Comment #1 from gcc at coreland dot ath dot cx  2009-05-30 15:01 ---
Created an attachment (id=17937)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17937&action=view)
Patch to Makefile to use 64 bit FreeBSD system package.


-- 


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



[Bug ada/40310] New: Patches for gcc 4.4.0 to support FreeBSD x86_64

2009-05-30 Thread gcc at coreland dot ath dot cx
See the attachments.


-- 
   Summary: Patches for gcc 4.4.0 to support FreeBSD x86_64
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at coreland dot ath dot cx
 GCC build triplet: x86_64-pc-freebsd7.2
  GCC host triplet: x86_64-pc-freebsd7.2
GCC target triplet: x86_64-pc-freebsd7.2


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



[Bug ada/39294] 4.3 - uncatchable exceptions when raised from package bodies at elaboration time.

2009-02-24 Thread gcc at coreland dot ath dot cx


--- Comment #1 from gcc at coreland dot ath dot cx  2009-02-24 20:05 ---
Have just been informed that this isn't a bug.

Oops.


-- 

gcc at coreland dot ath dot cx changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug ada/39294] New: 4.3 - uncatchable exceptions when raised from package bodies at elaboration time.

2009-02-24 Thread gcc at coreland dot ath dot cx
In GNAT 4.3.2, package bodies are able to raise uncatchable exceptions
in begin .. end sections:

-- pkg1.ads

package pkg1 is

  procedure init;

end pkg1;

-- pkg1.adb

with Ada.Text_IO;

package body pkg1 is

  procedure init is
  begin
null;
  end init;

begin
  Ada.Text_IO.Put_Line ("raising exception...");
  raise Program_Error;
end pkg1;
-- main.adb

with Ada.Text_IO;
with pkg1;

procedure main is
begin
  null;
exception
  when others =>
Ada.Text_IO.Put_Line ("caught something");
end main;

$ gcc-4.3 -c pkg1.adb
$ gcc-4.3 -c main.adb
$ gnatbind main.ali
$ gnatlink -o main main.ali
$ ./main
raising exception...

raised PROGRAM_ERROR : pkg1.adb:14 explicit raise

Note that the all-catching 'when others =>' exception handler
at the end of main does NOT catch the Program_Error raised in
the package body.

I have tested on two different machines and obtained the same
results. The problem does not occur on 4.2 (the exception can
be caught cleanly).



FreeBSD 6.4-RELEASE-p1 #0:
Sun Dec 21 07:56:41 UTC 2008
r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

Using built-in specs.
Target: i386-portbld-freebsd6.4
Configured with: ./..//gcc-4.3.2/configure --enable-languages=c,ada
--disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local
--program-suffix=43 --bindir=/usr/local/bin/gcc43
--libdir=/usr/local/lib/gcc-4.3.2 --prefix=/usr/local
--mandir=/usr/local/man --infodir=/usr/local/info/gcc43
--build=i386-portbld-freebsd6.4
Thread model: posix
gcc version 4.3.2 (GCC)



Linux blank 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 GNU/Linux

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.3-3'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-targets=all --enable-cld --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.3 (Debian 4.3.3-3)


-- 
   Summary: 4.3 - uncatchable exceptions when raised from package
bodies at elaboration time.
   Product: gcc
   Version: 4.3.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: gcc at coreland dot ath dot cx
GCC target triplet: i386-portbld-freebsd6.4


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