Index: gcc/tree-diagnostic.c
===================================================================
--- gcc/tree-diagnostic.c	(revision 190262)
+++ gcc/tree-diagnostic.c	(working copy)
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3.  
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "input.h"
 #include "tree.h"
 #include "diagnostic.h"
 #include "tree-diagnostic.h"
@@ -115,6 +116,8 @@ maybe_unwind_expanded_macro_loc (diagnos
   unsigned ix;
   loc_map_pair loc, *iter;
 
+  if (has_discriminator (where))
+    where = map_discriminator_location (where);
   map = linemap_lookup (line_table, where);
   if (!linemap_macro_expansion_map_p (map))
     return;
Index: gcc/diagnostic.c
===================================================================
--- gcc/diagnostic.c	(revision 190262)
+++ gcc/diagnostic.c	(working copy)
@@ -270,6 +270,9 @@ diagnostic_report_current_module (diagno
   if (where <= BUILTINS_LOCATION)
     return;
 
+  if (has_discriminator (where))
+    where = map_discriminator_location (where);
+
   linemap_resolve_location (line_table, where,
 			    LRK_MACRO_DEFINITION_LOCATION,
 			    &map);
