This is the mail archive of the gcc-patches@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: [patch]: Fix PR testsuite/23239


> John David Anglin wrote:
> >	PR testsuite/23239
> >	* gcc.dg/tree-prof/val-prof-5.c: Fix scan-tree-dump regexp.
> 
> You didn't explain why there was a problem here, and I was curious, so I
> checked.  It turns out that the PA port defines the undocumented

Sorry, the change was proposed based solely on the output observed
in val-prof-5.c.t09.tree_profile.  This was given in the PR.

> ASM_PN_FORMAT macro, and thus we need a different regexp here to match
> what the PA port emits.  In general, this is a losing solution, since
> ASM_PN_FORMAT can have an arbitrary definition, and thus we may need
> future regexp changes here.  In fact, if there were any ports that
> defined both NO_DOT_IN_LABELS and NO_DOLLAR_IN_LABELS then we would
> already have a problem, because the default value of ASM_PN_FORMAT in
> that case won't match either the existing regexp or your new one.  Since
>  elfos.h defines NO_DOLLAR_IN_LABELS, it looks like a few ports defining
> NO_DOT_IN_LABELS like mmix-elf and xtensa-elf are still broken.  We
> probably could change this no-dot no-dollar value in defaults.h to match
> the one in the pa.h file, which is also used by a number of other
> targets.  This plus your fix should make this testcase work for all targets.

Your investigation got me curious as to why ASM_PN_FORMAT is defined
in pa.h.  At the moment, it's not at all clear why the default in
defaults.h isn't usable.  Dots and dollars are allowed in labels.
I've checked that hppa-unknown-linux-gnu and hppa2.0w-hp-hpux11.11
both build with no regressions using GAS using the default.  The define
itself was introduced by Ghazi in 2002 based on an earlier definition of
ASM_FORMAT_PRIVATE_NAME.  The ASM_FORMAT_PRIVATE_NAME define predates
the ChangeLog entries.  There are several other ports using the
same define for ASM_PN_FORMAT as the PA.  So, I suspect that it was
just copied from one port to another.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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