public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nicholas Clifton <nickc@redhat.com>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Cc: Jan Hubicka <jh@suse.cz>, gcc-patches@gcc.gnu.org
Subject: Re: [BUILDROBOT] v850 fallout
Date: Wed, 25 Jun 2014 09:21:00 -0000	[thread overview]
Message-ID: <53AA9485.7060105@redhat.com> (raw)
In-Reply-To: <20140625011226.GM31494@lug-owl.de>

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

Hi Guys,

 > Jan-Benedict Glaw wrote:
>
> I've been away for holidays and other stuff, so this is a bit late,
> but nevermind... The stringification of DECL_SECTION_NAME had some
> fallout, see eg. http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272454
>
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2647: error: cannot convert ‘tree_node*’ to ‘const char*’ for argument ‘2’ to ‘void set_decl_section_name(tree_node*, const char*)’


Fixed with this patch.

Cheers
   Nick

gcc/ChangeLog
2014-06-25  Nick Clifton  <nickc@redhat.com>

	* config/v850/v850.c (GHS_default_section_names): Change to const
	char * type.
	(GHS_current_section_names): Likewise.
	(v850_insert_attributes): Do not build strings, just assign the
	names directly.  Change the type of 'chosen_section' to const
	char*.
	* config/v850/v850-c.c (ghs_pragma_section): Assign the alias
	directly to the array entry.
	* config/v850/v850.h (GHS_default_section_names): Change to const
	char * type.
	(GHS_current_section_names): Likewise.


[-- Attachment #2: v850.patch --]
[-- Type: text/x-patch, Size: 3447 bytes --]

Index: gcc/config/v850/v850-c.c
===================================================================
--- gcc/config/v850/v850-c.c	(revision 211967)
+++ gcc/config/v850/v850-c.c	(working copy)
@@ -175,8 +175,7 @@
       if (streq (alias, "default"))
 	GHS_current_section_names [kind] = NULL;
       else
-	GHS_current_section_names [kind] =
-	  build_string (strlen (alias) + 1, alias);
+	GHS_current_section_names [kind] = alias;
     }
   while (repeat);
 
Index: gcc/config/v850/v850.c
===================================================================
--- gcc/config/v850/v850.c	(revision 211967)
+++ gcc/config/v850/v850.c	(working copy)
@@ -54,8 +54,8 @@
 static void v850_print_operand_address (FILE *, rtx);
 
 /* Names of the various data areas used on the v850.  */
-tree GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
-tree GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
+const char * GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
+const char * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
 
 /* Track the current data area set by the data area pragma (which 
    can be nested).  Tested by check_default_data_area.  */
@@ -2569,19 +2569,19 @@
   if (GHS_default_section_names [(int) GHS_SECTION_KIND_SDATA] == NULL)
     {
       GHS_default_section_names [(int) GHS_SECTION_KIND_SDATA]
-	= build_string (sizeof (".sdata")-1, ".sdata");
+	= ".sdata";
 
       GHS_default_section_names [(int) GHS_SECTION_KIND_ROSDATA]
-	= build_string (sizeof (".rosdata")-1, ".rosdata");
+	= ".rosdata";
 
       GHS_default_section_names [(int) GHS_SECTION_KIND_TDATA]
-	= build_string (sizeof (".tdata")-1, ".tdata");
+	= ".tdata";
       
       GHS_default_section_names [(int) GHS_SECTION_KIND_ZDATA]
-	= build_string (sizeof (".zdata")-1, ".zdata");
+	= ".zdata";
 
       GHS_default_section_names [(int) GHS_SECTION_KIND_ROZDATA]
-	= build_string (sizeof (".rozdata")-1, ".rozdata");
+	= ".rozdata";
     }
   
   if (current_function_decl == NULL_TREE
@@ -2592,7 +2592,7 @@
       && !DECL_SECTION_NAME (decl))
     {
       enum GHS_section_kind kind = GHS_SECTION_KIND_DEFAULT;
-      tree chosen_section;
+      const char * chosen_section;
 
       if (TREE_CODE (decl) == FUNCTION_DECL)
 	kind = GHS_SECTION_KIND_TEXT;
Index: gcc/config/v850/v850.h
===================================================================
--- gcc/config/v850/v850.h	(revision 211967)
+++ gcc/config/v850/v850.h	(working copy)
@@ -916,7 +916,7 @@
    For the *normal* section kinds (like .data, .text, etc.) we do not
    want to explicitly force the name of these sections, but would rather
    let the linker (or at least the back end) choose the name of the 
-   section, UNLESS the user has force a specific name for these section
+   section, UNLESS the user has forced a specific name for these section
    kinds.  To accomplish this set the name in ghs_default_section_names
    to null.  */
 
@@ -952,8 +952,8 @@
 extern data_area_stack_element * data_area_stack;
 
 /* Names of the various data areas used on the v850.  */
-extern tree GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
-extern tree GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
+extern const char * GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
+extern const char * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
 
 /* The assembler op to start the file.  */
 

  parent reply	other threads:[~2014-06-25  9:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12  4:33 Turn DECL_SECTION_NAME into string Jan Hubicka
2014-06-12  7:52 ` Richard Biener
2014-06-12  8:13   ` Jan Hubicka
2014-06-17  6:40 ` Thomas Schwinge
2014-06-17  8:19   ` Richard Biener
2014-06-25  1:12 ` [BUILDROBOT] v850 fallout (was: Turn DECL_SECTION_NAME into string) Jan-Benedict Glaw
2014-06-25  5:18   ` Jan Hubicka
2014-06-25  9:21   ` Nicholas Clifton [this message]
2014-06-25  1:16 ` [BUILDROBOT] xtensa " Jan-Benedict Glaw
2014-06-25  5:20   ` Jan Hubicka
2014-06-25 15:56     ` augustine.sterling
2014-07-04 21:11       ` Jan-Benedict Glaw
2014-07-10 14:41         ` augustine.sterling
2014-06-25  1:23 ` [BUILDROBOT] frv " Jan-Benedict Glaw
2014-06-25  5:23   ` Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53AA9485.7060105@redhat.com \
    --to=nickc@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jbglaw@lug-owl.de \
    --cc=jh@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).