Hi!

On Mon, 9 Jan 2017 17:21:41 +0100, I wrote:
> On Thu, 29 Dec 2016 16:15:01 +0100, Jakub Jelinek <ja...@redhat.com> wrote:
> >     PR translation/78745
> >     * exgettext: Handle multi-line help texts in *.opt files.
> 
> With this committed in r243981, I noticed the following new snippet in
> gcc/po/gcc.pot:
> 
>     +#: config/nvptx/nvptx.c:1132
>     +msgid "tid.y;"
>     +msgstr ""
> 
> gcc/config/nvptx/nvptx.c:
> 
>    1126 #define ENTRY_TEMPLATE(PS, PS_BYTES, MAD_PS_32) "\
>    1127  (.param.u" PS " %arg, .param.u" PS " %stack, .param.u" PS " %sz)\n\
>    1128 {\n\
>    1129         .reg.u32 %r<3>;\n\
>    1130         .reg.u" PS " %R<4>;\n\
>    1131         mov.u32 %r0, %tid.y;\n\
>    1132         mov.u32 %r1, %ntid.y;\n\
>    1133         mov.u32 %r2, %ctaid.x;\n\
>    [...]
> 
> As I understand it, this is because of the special handling to collect
> "all %e and %n strings from driver specs, so those can be translated too"
> (function spec_error_string).  Probably harmless enough to just ignore
> it?

Well, this got reported as part of PR79332.  OK to address as follows?

commit d7e9c522704d9221659b1d752c33c708083a5ee0
Author: Thomas Schwinge <tho...@codesourcery.com>
Date:   Thu Feb 16 11:24:41 2017 +0100

    [PR translation/79332] "%ntid.y" confuses gcc.pot generation
    
            gcc/
            * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
---
 gcc/config/nvptx/nvptx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git gcc/config/nvptx/nvptx.c gcc/config/nvptx/nvptx.c
index 98278d3..c52b090 100644
--- gcc/config/nvptx/nvptx.c
+++ gcc/config/nvptx/nvptx.c
@@ -1123,13 +1123,15 @@ write_omp_entry (FILE *file, const char *name, const 
char *orig)
       func_decls << ".extern .func gomp_nvptx_main (.param.u" << POINTER_SIZE
         << " %in_ar1, .param.u" << POINTER_SIZE << " %in_ar2);\n";
     }
+  /* PR79332.  Single out this string; it confuses gcc.pot generation.  */
+#define NTID_Y "%ntid.y"
 #define ENTRY_TEMPLATE(PS, PS_BYTES, MAD_PS_32) "\
  (.param.u" PS " %arg, .param.u" PS " %stack, .param.u" PS " %sz)\n\
 {\n\
        .reg.u32 %r<3>;\n\
        .reg.u" PS " %R<4>;\n\
        mov.u32 %r0, %tid.y;\n\
-       mov.u32 %r1, %ntid.y;\n\
+       mov.u32 %r1, " NTID_Y ";\n\
        mov.u32 %r2, %ctaid.x;\n\
        cvt.u" PS ".u32 %R1, %r0;\n\
        " MAD_PS_32 " %R1, %r1, %r2, %R1;\n\
@@ -1157,6 +1159,7 @@ write_omp_entry (FILE *file, const char *name, const char 
*orig)
   static const char entry64[] = ENTRY_TEMPLATE ("64", "8", "mad.wide.u32");
   static const char entry32[] = ENTRY_TEMPLATE ("32", "4", "mad.lo.u32  ");
 #undef ENTRY_TEMPLATE
+#undef NTID_Y
   const char *entry_1 = TARGET_ABI64 ? entry64 : entry32;
   /* Position ENTRY_2 after the embedded nul using strlen of the prefix.  */
   const char *entry_2 = entry_1 + strlen (entry64) + 1;


Grüße
 Thomas

Reply via email to