aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-03-22 07:18:38 +0000
committerJakub Jelinek <jakub@redhat.com>2014-03-22 07:18:38 +0000
commit8c2ee312652060834d11a1d955f142f20daa3b23 (patch)
treed27174ed6e79ae0b0010eaf708bb6fbc53a18b8d
parenta8c4b038ee655197ee1c4708aafdfa78e7c4c728 (diff)
PR debug/60603
c-family/ * c-opts.c (c_finish_options): Restore cb_file_change call to <built-in>. fortran/ * cpp.c (gfc_cpp_init): Restore cb_change_file call to <built-in>. testsuite/ * gcc.dg/debug/dwarf2/dwarf2-macro2.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@208763 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-opts.c19
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/cpp.c1
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c7
6 files changed, 35 insertions, 9 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 4e5aea46841..536b4fc4ca2 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/60603
+ * c-opts.c (c_finish_options): Restore cb_file_change call to
+ <built-in>.
+
2014-03-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/36282
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 92ba481390d..e162e49a18a 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -1274,17 +1274,18 @@ c_finish_options (void)
{
size_t i;
- {
- /* Make sure all of the builtins about to be declared have
- BUILTINS_LOCATION has their source_location. */
- source_location builtins_loc = BUILTINS_LOCATION;
- cpp_force_token_locations (parse_in, &builtins_loc);
+ cb_file_change (parse_in,
+ linemap_add (line_table, LC_RENAME, 0,
+ _("<built-in>"), 0));
+ /* Make sure all of the builtins about to be declared have
+ BUILTINS_LOCATION has their source_location. */
+ source_location builtins_loc = BUILTINS_LOCATION;
+ cpp_force_token_locations (parse_in, &builtins_loc);
- cpp_init_builtins (parse_in, flag_hosted);
- c_cpp_builtins (parse_in);
+ cpp_init_builtins (parse_in, flag_hosted);
+ c_cpp_builtins (parse_in);
- cpp_stop_forcing_token_locations (parse_in);
- }
+ cpp_stop_forcing_token_locations (parse_in);
/* We're about to send user input to cpplib, so make it warn for
things that we previously (when we sent it internal definitions)
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index ef330df9fda..3e4d08d68c0 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/60603
+ * cpp.c (gfc_cpp_init): Restore cb_change_file call to
+ <built-in>.
+
2014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/60148
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index 68ce91ffdbf..169599003db 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -576,6 +576,7 @@ gfc_cpp_init (void)
if (gfc_option.flag_preprocessed)
return;
+ cpp_change_file (cpp_in, LC_RENAME, _("<built-in>"));
if (!gfc_cpp_option.no_predefined)
{
/* Make sure all of the builtins about to be declared have
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c2e77fbe2dc..3b22af8d9d9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/60603
+ * gcc.dg/debug/dwarf2/dwarf2-macro2.c: New test.
+
2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp1y/pr60033.C: Use target c++1y.
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c
new file mode 100644
index 00000000000..3dfa2908ef3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c
@@ -0,0 +1,7 @@
+/* Test to make sure the macro info includes the predefined macros with line number 0. */
+/* { dg-do compile } */
+/* { dg-options "-g3 -gdwarf -dA -fverbose-asm" } */
+/* { dg-final { scan-assembler "At line number 0" } } */
+
+#define FOO 1
+int i;