This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[nvptx, committed] Disable -gstatement-frontiers for nvptx


[ was: Re: [SFN+LVU+IEPM v4 6/9] [SFN] Introduce -gstatement-frontiers option, enable debug markers ]

On 11/10/2017 03:34 AM, Alexandre Oliva wrote:
Introduce a command line option to enable statement frontiers, enabled
by default in optimized builds with DWARF2+ debug information.

This patch depends on an earlier patch that completed the
infrastructure for debug markers, and on another patch that turns -g
into a negatable option prefix.

gcc/ChangeLog

	* common.opt (gstatement-frontiers): New, setting
	debug_nonbind_markers_p.

Hi,

the ptx syntax for the .loc directive is limited to:
...
.loc file_index line_number column_position
...
so this causes ptxas errors when compiling something for nvptx with -g, which breaks the nvptx build.

This patch disables gstatement-frontiers for nvptx.

Tested libgomp for x86_64 with nvptx accelerator.

Committed.

Thanks,
- Tom
Disable -gstatement-frontiers for nvptx

2017-12-27  Tom de Vries  <tom@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_option_override): Disable
	-gstatement-frontiers.

---
 gcc/config/nvptx/nvptx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index cce0a55..e024570 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -177,6 +177,8 @@ nvptx_option_override (void)
   if (!global_options_set.x_flag_toplevel_reorder)
     flag_toplevel_reorder = 1;
 
+  debug_nonbind_markers_p = 0;
+
   /* Set flag_no_common, unless explicitly disabled.  We fake common
      using .weak, and that's not entirely accurate, so avoid it
      unless forced.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]