]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Make this testcase a bit more realistic. The current code
authorJoel Brobecker <brobecker@gnat.com>
Thu, 4 Jan 2007 10:59:03 +0000 (10:59 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 4 Jan 2007 10:59:03 +0000 (10:59 +0000)
        is too simplistic, and allows the compiler to optimize out
        some of the entities we need for this testcase.
        * gdb.ada/null_record/bar.ads (Void_Star): New type.
        (Do_Nothing): Add extra parameter.
        * gdb.ada/null_record/bar.adb (Do_Nothing): Likewise.
        * gdb.ada/null_record/null_record.adb: Fake use of type Empty
        by using a variable of type Void_Star.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/null_record/bar.adb
gdb/testsuite/gdb.ada/null_record/bar.ads
gdb/testsuite/gdb.ada/null_record/null_record.adb

index f0439938f6b5aa888fd516072a6f88b18c0db5c2..9b4fe7e757149dd5d4436c0da80e8f5a6733430a 100644 (file)
@@ -1,3 +1,14 @@
+2006-01-04  Joel Brobecker  <brobecker@adacore.com>
+
+       Make this testcase a bit more realistic. The current code
+       is too simplistic, and allows the compiler to optimize out
+       some of the entities we need for this testcase.
+       * gdb.ada/null_record/bar.ads (Void_Star): New type.
+       (Do_Nothing): Add extra parameter.
+       * gdb.ada/null_record/bar.adb (Do_Nothing): Likewise.
+       * gdb.ada/null_record/null_record.adb: Fake use of type Empty
+       by using a variable of type Void_Star.
+
 2006-01-04  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.ada/catch_ex/foo.adb: New file.
index 9c751399cb169789d0cc83d7bf4da45b6cf5121f..b29f8fc02a1961510761a995ea9b51e62be2bf66 100644 (file)
@@ -1,4 +1,4 @@
---  Copyright 2004 Free Software Foundation, Inc.
+--  Copyright 2004, 2007 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 
 package body Bar is
 
-   procedure Do_Nothing is
+   procedure Do_Nothing (E : Void_Star) is
    begin
       null;
    end Do_Nothing;
index c3ca11b06d3e663ba5a2ca541e15fd545c61cf38..ffdd554f7fd0dae9d79a37b348d0d7ca4f225721 100644 (file)
@@ -1,4 +1,4 @@
---  Copyright 2004 Free Software Foundation, Inc.
+--  Copyright 2004, 2007 Free Software Foundation, Inc.
 --
 --  This program is free software; you can redistribute it and/or modify
 --  it under the terms of the GNU General Public License as published by
@@ -17,7 +17,8 @@
 package Bar is
 
    type Empty is null record;
+   type Void_Star is access all Empty;
 
-   procedure Do_Nothing;
+   procedure Do_Nothing (E : Void_Star);
 
 end Bar;
index 260b3d660972ad7634319a330194668c9f5f37cd..28846dbc85409a73a3cf24de2bae3f336729d929 100644 (file)
@@ -17,7 +17,8 @@
 with Bar; use Bar;
 
 procedure Null_Record is
+   E : Void_Star := new Empty;
 begin
-   Do_Nothing;
+   Do_Nothing (E);
 end Null_Record;