diff options
author | David Malcolm <dmalcolm@redhat.com> | 2016-08-19 00:18:18 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2016-08-19 00:18:18 +0000 |
commit | 82f72146967e71693f2d4f6646f35c3c00780602 (patch) | |
tree | 5faef7399b046f2419d8c84d6f16545f6f1e97cc /gcc/testsuite/gcc.dg | |
parent | f4e46e34a2c517e1c6c3d0802aba82a9637d677d (diff) | |
download | gcc-82f72146967e71693f2d4f6646f35c3c00780602.zip gcc-82f72146967e71693f2d4f6646f35c3c00780602.tar.gz gcc-82f72146967e71693f2d4f6646f35c3c00780602.tar.bz2 |
Add source information to -fverbose-asm
gcc/ChangeLog:
* doc/invoke.texi (fverbose-asm): Note that source code lines
are emitted, and provide an example.
* final.c (asm_show_source): New function.
(final_scan_insn): Call asm_show_source.
From-SVN: r239604
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/verbose-asm-2.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/verbose-asm-2.c b/gcc/testsuite/gcc.dg/verbose-asm-2.c new file mode 100644 index 0000000..747bff1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/verbose-asm-2.c @@ -0,0 +1,15 @@ +/* Ensure that the -fverbose-asm leads to source code information in the generated asm. */ +/* { dg-options "-fverbose-asm" } */ + +int test (int n) +{ + int i; + int total = 0; + + for (i = 0; i < n; i++) + total += i * i; + + return total; +} + +/* { dg-final { scan-assembler "total = 0" } } */ |