diff options
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r-- | gcc/testsuite/gnat.dg/debug11_pkg.adb | 26 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/debug11_pkg.ads | 11 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/debug11_pkg2.ads | 9 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/debug7.adb | 2 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/debug9.adb | 2 |
5 files changed, 48 insertions, 2 deletions
diff --git a/gcc/testsuite/gnat.dg/debug11_pkg.adb b/gcc/testsuite/gnat.dg/debug11_pkg.adb new file mode 100644 index 00000000000..336f2fd69be --- /dev/null +++ b/gcc/testsuite/gnat.dg/debug11_pkg.adb @@ -0,0 +1,26 @@ +-- { dg-options "-cargs -g -dA -margs" } +-- { dg-final { scan-assembler "local_imported_func" } } +-- { dg-final { scan-assembler "local_imported_var" } } +-- { dg-final { scan-assembler "global_imported_func" } } +-- { dg-final { scan-assembler "global_imported_var" } } +-- { dg-final { scan-assembler-not "foreign_imported_func" } } +-- { dg-final { scan-assembler-not "foreign_imported_var" } } + +with Debug11_Pkg2; + +package body Debug11_Pkg is + + procedure Dummy is + Local_Imported_Var : Integer; + pragma Import (C, Local_Imported_Var, "imported_var"); + + function Local_Imported_Func return Integer; + pragma Import (C, Local_Imported_Func, "imported_func"); + begin + Local_Imported_Var := Local_Imported_Func; + Global_Imported_Var := Global_Imported_Func; + Debug11_Pkg2.Foreign_Imported_Var := + Debug11_Pkg2.Foreign_Imported_Func; + end Dummy; + +end Debug11_Pkg; diff --git a/gcc/testsuite/gnat.dg/debug11_pkg.ads b/gcc/testsuite/gnat.dg/debug11_pkg.ads new file mode 100644 index 00000000000..dc453100d41 --- /dev/null +++ b/gcc/testsuite/gnat.dg/debug11_pkg.ads @@ -0,0 +1,11 @@ +package Debug11_Pkg is + + Global_Imported_Var : Integer; + pragma Import (C, Global_Imported_Var, "imported_var"); + + function Global_Imported_Func return Integer; + pragma Import (C, Global_Imported_Func, "imported_func"); + + procedure Dummy; + +end Debug11_Pkg; diff --git a/gcc/testsuite/gnat.dg/debug11_pkg2.ads b/gcc/testsuite/gnat.dg/debug11_pkg2.ads new file mode 100644 index 00000000000..350f51c5b40 --- /dev/null +++ b/gcc/testsuite/gnat.dg/debug11_pkg2.ads @@ -0,0 +1,9 @@ +package Debug11_Pkg2 is + + Foreign_Imported_Var : Integer; + pragma Import (C, Foreign_Imported_Var, "imported_var"); + + function Foreign_Imported_Func return Integer; + pragma Import (C, Foreign_Imported_Func, "imported_func"); + +end Debug11_Pkg2; diff --git a/gcc/testsuite/gnat.dg/debug7.adb b/gcc/testsuite/gnat.dg/debug7.adb index 3defc2c5f20..41728ea743f 100644 --- a/gcc/testsuite/gnat.dg/debug7.adb +++ b/gcc/testsuite/gnat.dg/debug7.adb @@ -1,5 +1,5 @@ -- { dg-do compile } --- { dg-skip-if "No dwarf-2 support" { hppa*-*-hpux* } "*" "" } +-- { dg-skip-if "No dwarf-2 support" { hppa*-*-hpux* } } -- { dg-options "-cargs -gdwarf-2 -gstrict-dwarf -dA -margs" } -- { dg-final { scan-assembler "DW_TAG_imported_decl" } } diff --git a/gcc/testsuite/gnat.dg/debug9.adb b/gcc/testsuite/gnat.dg/debug9.adb index eaf370058a9..ec11af1f690 100644 --- a/gcc/testsuite/gnat.dg/debug9.adb +++ b/gcc/testsuite/gnat.dg/debug9.adb @@ -7,7 +7,7 @@ -- some hackish way to check that types are output in the proper context (i.e. -- at global or local scope). -- --- { dg-skip-if "No dwarf-4 support" { hppa*-*-hpux* } "*" "" } +-- { dg-skip-if "No dwarf-4 support" { hppa*-*-hpux* } } -- { dg-options "-cargs -gdwarf-4 -fdebug-types-section -dA -margs" } -- { dg-final { scan-assembler-times "\\(DIE \\(0x\[a-f0-9\]*\\) DW_TAG_type_unit\\)" 0 } } |