On Thu, Feb 26, 2015 at 11:27:06AM +0100, Thomas Schwinge wrote:
> Is this not the right way to skip it, or, Bernd, is this because we're
> not yet handling some debug stuff in nvptx?  (I tested that
> <http://news.gmane.org/find-root.php?message_id=%3C5466473A.1090809%40codesourcery.com%3E>
> does not help with that.)  The following does make it work (that is,
> resolve the ICEs), but that feels a bit too much ;-) of a hack:
> 
> --- gcc/var-tracking.c
> +++ gcc/var-tracking.c
> @@ -10305,7 +10322,8 @@ variable_tracking_main_1 (void)
>  {
>    bool success;
>  
> -  if (flag_var_tracking_assignments < 0)
> +  if (flag_var_tracking_assignments < 0
> +      || targetm.no_register_allocation)
>      {
>        delete_debug_insns ();
>        return 0;

No, IMHO that is the right fix, not a hack.  But of course would deserve
a comment.  Plus of course you can also just override
flag_var_tracking_assignments in the nvptx override option hook, and
perhaps in tree-streamer-in.c clear flag_var_tracking_assignments in the
OPTIMIZATION_NODE too (or just add a hook for that, as I said before).

        Jakub

Reply via email to