This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

BIB merge Ada regression


I updated just after the merge and reran ACATS and got (only :) three regressions
(cxa4026,27,30) from just before the merge on x86/linux. It turns
out to be a -O2 miscompilation of Ada.Strings.Search.Index that
can be reduced to the simple source code below.

$ gnatmake -O2 toto.adb
$ ./toto

raised STORAGE_ERROR : stack overflow (or erroneous memory access)
$

(GNAT blurb for SIGSEGV.)

It works (no crash) at -O0 and -O1, and with a previous build at all optimization levels.

Unfortunately I have no working GCC 3.3/4 debugger yet so I can't go
much further right now.

--
Laurent Guerby <guerby@acm.org>

-- reduced from cxa4026
package Toto_P is

type Character_Mapping_Function is
access function (From : in Character) return Character;

function Map_To_Lower_Case (From : Character) return Character;

end Toto_p;

package body Toto_P is

function Map_To_Lower_Case (From : Character) return Character is
begin
return From;
end Map_To_Lower_Case;

end Toto_p;

with Toto_P; use Toto_P;
procedure Toto is

function Index2 (Mapping : in Character_Mapping_Function) return Natural is
begin
if Mapping.all ('a') = 'a' then
return 1;
else
return 0;
end if;
end Index2;

Map_To_Lower_Case_Ptr : Character_Mapping_Function := Map_To_Lower_Case'Access;
X : Natural := Index2 (Mapping => Map_To_Lower_Case_Ptr);
begin
null;
end Toto;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]