This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/15401] New: [3.15p/3.4 regression] -O2 or higher generates wrong code
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 May 2004 19:14:44 -0000
- Subject: [Bug ada/15401] New: [3.15p/3.4 regression] -O2 or higher generates wrong code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
with text_io;
procedure Test_103 is
function one return integer is
begin
return 1;
end;
type T1 is record
name : string (1..4);
end record;
x : T1 := (name => "bill");
begin
x.name(one) := 'j';
if x.name /= "jill"
then text_io.put_line("failed");
end if;
text_io.put_line(x.name);
end Test_103;
With GNAT 3.15p, I get the correct answer "jill" with -O0, -O1, -O2 and -O3.
With 3.4, at -O2 or higher, the output is "failed".
--
Summary: [3.15p/3.4 regression] -O2 or higher generates wrong
code
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ludovic dot brenta at insalien dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15401