OSDN Git Service

2006-07-23 Steven Bosscher <steven@gcc.gnu.org>
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Jul 2006 17:56:34 +0000 (17:56 +0000)
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Jul 2006 17:56:34 +0000 (17:56 +0000)
PR debug/25468
* config/elfos.h (ASM_OUTPUT_ASCII): Remove 'register' marks.
Cache the last found '\0' marker to avoid quadratic behavior.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115685 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/elfos.h
gcc/fortran/ChangeLog
gcc/testsuite/gfortran.fortran-torture/execute/der_init_4.f90

index de9be71..d52141a 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-23  Steven Bosscher  <steven@gcc.gnu.org>
+
+       PR debug/25468
+       * config/elfos.h (ASM_OUTPUT_ASCII): Remove 'register' marks.
+       Cache the last found '\0' marker to avoid quadratic behavior.
+
 2006-07-23  Jan Hubicka  <jh@suse.cz>
 
        * i386.md (subsi_3_zext): Fix output template.
index 31e309d..a2bd49f 100644 (file)
@@ -429,14 +429,15 @@ Boston, MA 02110-1301, USA.  */
 #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH)                            \
   do                                                                   \
     {                                                                  \
-      register const unsigned char *_ascii_bytes =                     \
+      const unsigned char *_ascii_bytes =                              \
        (const unsigned char *) (STR);                                  \
-      register const unsigned char *limit = _ascii_bytes + (LENGTH);   \
-      register unsigned bytes_in_chunk = 0;                            \
+      const unsigned char *limit = _ascii_bytes + (LENGTH);            \
+      const unsigned char *last_null = NULL;                           \
+      unsigned bytes_in_chunk = 0;                                     \
                                                                        \
       for (; _ascii_bytes < limit; _ascii_bytes++)                     \
         {                                                              \
-         register const unsigned char *p;                              \
+         const unsigned char *p;                                       \
                                                                        \
          if (bytes_in_chunk >= 60)                                     \
            {                                                           \
@@ -444,8 +445,14 @@ Boston, MA 02110-1301, USA.  */
              bytes_in_chunk = 0;                                       \
            }                                                           \
                                                                        \
-         for (p = _ascii_bytes; p < limit && *p != '\0'; p++)          \
-           continue;                                                   \
+         if (_ascii_bytes > last_null)                                 \
+           {                                                           \
+             for (p = _ascii_bytes; p < limit && *p != '\0'; p++)      \
+               continue;                                               \
+             last_null = p;                                            \
+           }                                                           \
+         else                                                          \
+           p = last_null;                                              \
                                                                        \
          if (p < limit && (p - _ascii_bytes) <= (long)STRING_LIMIT)    \
            {                                                           \
index ad63dd1..13ba611 100644 (file)
@@ -1,6 +1,6 @@
 2006-07-22  Steven Bosscher  <steven@gcc.gnu.org> 
 
-    PR fortran/28439
+       PR fortran/28439
        * trans-stmt.c (gfc_trans_arithmetic_if): Evaluate the condition once.
 
 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
index 2b13620..644ef65 100644 (file)
@@ -1,5 +1,5 @@
 ! PR13930
-! We were trying to assugn a default initializer to dummy variables.
+! We were trying to assign a default initializer to dummy variables.
 program der_init_4
   type t
     integer :: i = 42