This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

objc/5587: Objc problems with user_label_prefix



>Number:         5587
>Category:       objc
>Synopsis:       Objc problems with user_label_prefix
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 04 11:06:08 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Krister Walfridsson
>Release:        gcc version 3.1 20020201 (experimental)
>Organization:
>Environment:
arm-unknown-netbsd1.5Y
Configured with: ../gcc/configure --disable-nls
>Description:
The objc testsuite fails most of the tests (and of course real programs too)
for arm/netbsd because the compiler cannot decide if it should add the
user_label_prefix or not to __objc_class_name_XXX. This used to work, but
was changed in the cleanup

   2001-06-27  Stan Shebs  <shebs@apple.com>
           * objc/objc-act.c (handle_impent): Rewrite to be more portable
           and to use ASM_DECLARE_CLASS_REFERENCE.

The patch below corrects the construction of the label names.
>How-To-Repeat:
Run the objc test-suite on arm-unknown-netbsd1.5Y (or any other target that uses user_label_prefix?)

See for example http://gcc.gnu.org/ml/gcc-testresults/2002-02/msg00035.html
>Fix:
2002-02-03  Krister Walfridsson  <cato@df.lth.se>

        * objc/objc-act.c (handle_impent): Remove '*' from label names.


Index: gcc/gcc/objc/objc-act.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v
retrieving revision 1.124
diff -c -3 -p -r1.124 objc-act.c
*** objc-act.c  2002/01/29 17:19:56     1.124
--- objc-act.c  2002/02/03 22:56:43
*************** handle_impent (impent)
*** 8323,8329 ****
  
        string = (char *) alloca (strlen (class_name) + 30);
  
!       sprintf (string, "*%sobjc_class_name_%s",
                 (flag_next_runtime ? "." : "__"), class_name);
      }
    else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE)
--- 8323,8329 ----
  
        string = (char *) alloca (strlen (class_name) + 30);
  
!       sprintf (string, "%sobjc_class_name_%s",
                 (flag_next_runtime ? "." : "__"), class_name);
      }
    else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE)
*************** handle_impent (impent)
*** 8339,8345 ****
        /* Do the same for categories.  Even though no references to
           these symbols are generated automatically by the compiler, it
           gives you a handle to pull them into an archive by hand.  */
!       sprintf (string, "*%sobjc_category_name_%s_%s",
                 (flag_next_runtime ? "." : "__"), class_name, class_super_name);
      }
    else
--- 8339,8345 ----
        /* Do the same for categories.  Even though no references to
           these symbols are generated automatically by the compiler, it
           gives you a handle to pull them into an archive by hand.  */
!       sprintf (string, "%sobjc_category_name_%s_%s",
                 (flag_next_runtime ? "." : "__"), class_name, class_super_name);
      }
    else
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]