Commit b35e0fa0 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/60603 (.debug_macinfo/.debug_macro has wrong line numbers for built-in macros)

	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.

From-SVN: r208763
parent e10bd1ca
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
......
......@@ -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)
......
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
......
......@@ -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
......
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.
......
/* 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment