aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c b/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
new file mode 100644
index 000000000..a028d1484
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
@@ -0,0 +1,15 @@
+/* Verify the DWARF encoding of C99 floating point types. */
+
+/* { dg-do compile */
+/* { dg-options "-O0 -gdwarf -dA" } */
+/* { dg-final { scan-assembler "0x4.*DW_AT_encoding" } } */
+/* { dg-final { scan-assembler "0x4.*DW_AT_byte_size" } } */
+/* { dg-final { scan-assembler "0x8.*DW_AT_byte_size" } } */
+/* { dg-final { scan-assembler "0x10.*DW_AT_byte_size" } } */
+
+void foo ()
+{
+ float f = 1.5f;
+ double d = 1.5;
+ long double l = 1.5l;
+}