This is the mail archive of the gcc-bugs@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]

Re: GCC testsuite run before and after ~2.12.1 upgraded to pre-2.13


In article <200207260430.g6Q4UOSi002790@latour.rsch.comm.mot.com>, I wrote:

> (Based upon the analysis below, I am CCing gcc-bugs RE PR 7171.  The
>  version numbers in the subject line refer to binutils.  Quick
>  summary: More C++ test cases fail with binutils pre-2.13 than failed
>  with binutils ~2.12.1.  This behavior has been spotted on a wide
>  variety of platforms.)
[...]
> We now have reports of this exact failure symptom on (at least):
> i686-pc-linux-gnu (PR 7171), sparc-sun-solaris, i386-unknown-freebsd,
> alpha-*-netbsd, i386-*-netbsd

> I can investigate further but not until Friday afternoon.

Well, here is the result of the further investigation.

The following new sanity check catches the problem as close to the
root source as I can figure out based on my knowledge.  There appears
to be a conflict between default_section_type_flags() and
categorize_decl_for_section().  categorize_decl_for_section() uses
TREE_READONLY() and only considers ``reloc'' when flag_pic is true.
default_section_type_flags() uses DECL_READONLY_SECTION() which uses a
subtly different notion of read-only.

Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.296
diff -c -p -r1.296 varasm.c
*** varasm.c	26 Jun 2002 15:16:01 -0000	1.296
--- varasm.c	27 Jul 2002 00:38:54 -0000
*************** named_section (decl, name, reloc)
*** 454,459 ****
--- 454,465 ----
  	error_with_decl (decl, "%s causes a section type conflict");
      }
  
+   /* Sanity check readonly status of section as encoded in section
+      name verses per-target or default computed section flags. */
+   if ((flags & SECTION_WRITE) && (!strncmp (name, ".rodata.", 8)
+ 				  || !strncmp (name, ".gnu.linkonce.r.", 16)))
+     error_with_decl (decl, "%s causes a section name/write status conflict");
+ 
    named_section_flags (name, flags);
  }
  


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