diff mbox

[BUILDROBOT] xtensa fallout (was: Turn DECL_SECTION_NAME into string)

Message ID 20140625052053.GD30367@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka June 25, 2014, 5:20 a.m. UTC
> Hi!
> 
> This is the xtensa fallout, see http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
> 
> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o insn-preds.o -MT insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int call_insn_operand_1(rtx, machine_mode)’:
> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: cannot convert ‘const char*’ to ‘tree’ in assignment
> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: cannot convert ‘const char*’ to ‘tree’ in assignment
> make[1]: *** [insn-preds.o] Error 1
Should be fixed by this (and I see in my prevoius mail I wanted TREE_STRING_POINTER)

> 
> MfG, JBG
> 
> -- 
>       Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
> Signature of:           Ich hatte in letzter Zeit ein bißchen viel Realitycheck.
> the second  :               Langsam möchte ich mal wieder weiterträumen können.
>                              -- Maximilian Wilhelm (18. Mai 2005, #lug-owl.de)

Comments

augustine.sterling@gmail.com June 25, 2014, 3:55 p.m. UTC | #1
On Tue, Jun 24, 2014 at 10:20 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Hi!
>>
>> This is the xtensa fallout, see http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
>>
>> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o insn-preds.o -MT insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
>> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int call_insn_operand_1(rtx, machine_mode)’:
>> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: cannot convert ‘const char*’ to ‘tree’ in assignment
>> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: cannot convert ‘const char*’ to ‘tree’ in assignment
>> make[1]: *** [insn-preds.o] Error 1
> Should be fixed by this (and I see in my prevoius mail I wanted TREE_STRING_POINTER)

[resend due to gmail's stupid html-by-default]

This patch looks correct to me, but I haven't watched quite enough of
the underlying change to know that replacing the strcmp with pointer
equality is really the right thing.

If it is, approved for Xtensa.

>
> Index: gcc/config/xtensa/predicates.md
> ===================================================================
> --- gcc/config/xtensa/predicates.md     (revision 211693)
> +++ gcc/config/xtensa/predicates.md     (working copy)
> @@ -97,7 +97,8 @@
>        /* Direct calls only allowed to static functions with PIC.  */
>        if (flag_pic)
>         {
> -         tree callee, callee_sec, caller_sec;
> +         tree callee;
> +         const char * callee_sec, caller_sec;
>
>           if (GET_CODE (op) != SYMBOL_REF
>               || !SYMBOL_REF_LOCAL_P (op) || SYMBOL_REF_EXTERNAL_P (op))
> @@ -117,10 +118,9 @@
>               if (DECL_ONE_ONLY (callee))
>                 return false;
>               callee_sec = DECL_SECTION_NAME (callee);
> -             if (((caller_sec == NULL_TREE) ^ (callee_sec == NULL_TREE))
> -                 || (caller_sec != NULL_TREE
> -                     && strcmp (TREE_STRING_POINTER (caller_sec),
> -                                TREE_STRING_POINTER (callee_sec)) != 0))
> +             if (((caller_sec == NULL) ^ (callee_sec == NULL))
> +                 || (caller_sec != NULL
> +                     && caller_sec != callee_sec))
>                 return false;
>             }
>           else if (caller_sec != NULL_TREE)
>>
>> MfG, JBG
>>
>> --
>>       Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
>> Signature of:           Ich hatte in letzter Zeit ein bißchen viel Realitycheck.
>> the second  :               Langsam möchte ich mal wieder weiterträumen können.
>>                              -- Maximilian Wilhelm (18. Mai 2005, #lug-owl.de)
>
>
Jan-Benedict Glaw July 4, 2014, 9:11 p.m. UTC | #2
On Wed, 2014-06-25 08:55:57 -0700, augustine.sterling@gmail.com <augustine.sterling@gmail.com> wrote:
> On Tue, Jun 24, 2014 at 10:20 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > > This is the xtensa fallout, see http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
> > >
> > > g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o insn-preds.o -MT insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int call_insn_operand_1(rtx, machine_mode)’:
> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: cannot convert ‘const char*’ to ‘tree’ in assignment
> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: cannot convert ‘const char*’ to ‘tree’ in assignment
> > > make[1]: *** [insn-preds.o] Error 1
> > Should be fixed by this (and I see in my prevoius mail I wanted TREE_STRING_POINTER)
> 
> [resend due to gmail's stupid html-by-default]
> 
> This patch looks correct to me, but I haven't watched quite enough of
> the underlying change to know that replacing the strcmp with pointer
> equality is really the right thing.
> 
> If it is, approved for Xtensa.

*ping*

As Jan wrote it, I *guess* it probably is (haven't checked.)

MfG, JBG
augustine.sterling@gmail.com July 10, 2014, 2:41 p.m. UTC | #3
On Fri, Jul 4, 2014 at 2:11 PM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Wed, 2014-06-25 08:55:57 -0700, augustine.sterling@gmail.com <augustine.sterling@gmail.com> wrote:
>> On Tue, Jun 24, 2014 at 10:20 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> > > This is the xtensa fallout, see http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
>> > >
>> > > g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o insn-preds.o -MT insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
>> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int call_insn_operand_1(rtx, machine_mode)’:
>> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: cannot convert ‘const char*’ to ‘tree’ in assignment
>> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: cannot convert ‘const char*’ to ‘tree’ in assignment
>> > > make[1]: *** [insn-preds.o] Error 1
>> > Should be fixed by this (and I see in my prevoius mail I wanted TREE_STRING_POINTER)
>>
>> [resend due to gmail's stupid html-by-default]
>>
>> This patch looks correct to me, but I haven't watched quite enough of
>> the underlying change to know that replacing the strcmp with pointer
>> equality is really the right thing.
>>
>> If it is, approved for Xtensa.
>
> *ping*
>
> As Jan wrote it, I *guess* it probably is (haven't checked.)

Approved.
diff mbox

Patch

Index: gcc/config/xtensa/predicates.md
===================================================================
--- gcc/config/xtensa/predicates.md	(revision 211693)
+++ gcc/config/xtensa/predicates.md	(working copy)
@@ -97,7 +97,8 @@ 
       /* Direct calls only allowed to static functions with PIC.  */
       if (flag_pic)
 	{
-	  tree callee, callee_sec, caller_sec;
+	  tree callee;
+	  const char * callee_sec, caller_sec;
 
 	  if (GET_CODE (op) != SYMBOL_REF
 	      || !SYMBOL_REF_LOCAL_P (op) || SYMBOL_REF_EXTERNAL_P (op))
@@ -117,10 +118,9 @@ 
 	      if (DECL_ONE_ONLY (callee))
 		return false;
 	      callee_sec = DECL_SECTION_NAME (callee);
-	      if (((caller_sec == NULL_TREE) ^ (callee_sec == NULL_TREE))
-		  || (caller_sec != NULL_TREE
-		      && strcmp (TREE_STRING_POINTER (caller_sec),
-				 TREE_STRING_POINTER (callee_sec)) != 0))
+	      if (((caller_sec == NULL) ^ (callee_sec == NULL))
+		  || (caller_sec != NULL
+		      && caller_sec != callee_sec))
 		return false;
 	    }
 	  else if (caller_sec != NULL_TREE)