public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
@ 2020-12-04 11:51 ro at gcc dot gnu.org
  2020-12-04 11:52 ` [Bug target/98139] " ro at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-04 11:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

            Bug ID: 98139
           Summary: varasm.c fails to compile on AIX 7.2:
                    -Werror=unused-variable
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: dje at gcc dot gnu.org
  Target Milestone: ---
              Host: powerpc-ibm-aix7.2.4.0
            Target: powerpc-ibm-aix7.2.4.0
             Build: powerpc-ibm-aix7.2.4.0

I've just tried a bootstrap of current master with a self-compiled GCC 8.4.0 on
gcc119 in the cfarm. The build failed compiling varasm.c in stage2:

/home/ro/gcc/src/gcc-master/gcc/varasm.c: In function 'void
output_constant_pool
_contents(rtx_constant_pool*)':
/home/ro/gcc/src/gcc-master/gcc/varasm.c:4254:21: error: unused variable 'name'
[-Werror=unused-variable]
 4254 |         const char *name = targetm.strip_name_encoding (XSTR
(desc->sym,
 0));
      |              

I've used the attached patch to finish the build.  It needs at last proper
formatting and wrapping the args in parens.

However, I wonder why there's no other report of this issue...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/98139] varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
  2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
@ 2020-12-04 11:52 ` ro at gcc dot gnu.org
  2020-12-04 13:00 ` dje at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2020-12-04 11:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 49678
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49678&action=edit
Hacky patch.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/98139] varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
  2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
  2020-12-04 11:52 ` [Bug target/98139] " ro at gcc dot gnu.org
@ 2020-12-04 13:00 ` dje at gcc dot gnu.org
  2020-12-04 13:39 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2020-12-04 13:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

--- Comment #2 from David Edelsohn <dje at gcc dot gnu.org> ---
I bootstrap GCC on AIX with, and the instructions in the CompileFarm wiki
recommend, --disable-werror.

If that currently is the only problem, we're lucky.  I don't know that this
hack is better.  Shrug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/98139] varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
  2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
  2020-12-04 11:52 ` [Bug target/98139] " ro at gcc dot gnu.org
  2020-12-04 13:00 ` dje at gcc dot gnu.org
@ 2020-12-04 13:39 ` rguenth at gcc dot gnu.org
  2020-12-04 13:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-04 13:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Guess the hack already is how xcoff.h defines ASM_OUTPUT_DEF.  Of course the
middle-end should have an alternate way to tell whether a target has alias
support - maybe it already has and the code is just no longer required.

So yeah, why not (the patch).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/98139] varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
  2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-12-04 13:39 ` rguenth at gcc dot gnu.org
@ 2020-12-04 13:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2020-12-04 13:46 ` dje at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2020-12-04 13:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from David Edelsohn <dje at gcc dot gnu.org> ---
> I bootstrap GCC on AIX with, and the instructions in the CompileFarm wiki
> recommend, --disable-werror.

Ah, I missed that.  It's the only instance of target-specific build
instructions in the Wiki.  Shouldn't this go to install.texi, too,
unless it's expected to be fixed before GCC 11?

> If that currently is the only problem, we're lucky.  I don't know that this
> hack is better.  Shrug.

I only tested C,C++, but a couple of months ago I tried with Ada
included and didn't have the issue at all (expect for PR ada/95549).

The big advantage of doing it automatically (either similarly to my
hack, variations of which have been used in the past when target macros
ignore one or more of their args, or by enabling --disable-werror by
default for AIX) is that you avoid wasted time: every time a developer
runs into this, he either starts to hunt down the issue (when she's
diligent) or moves on in disgust (the majority, I guess).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/98139] varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
  2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-12-04 13:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2020-12-04 13:46 ` dje at gcc dot gnu.org
  2020-12-05 22:10 ` dje at gcc dot gnu.org
  2020-12-07 11:52 ` ro at CeBiTec dot Uni-Bielefeld.DE
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2020-12-04 13:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

--- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> ---
It has nothing to do with the proper way to install GCC on AIX.

It was not the only -Werror failure on AIX.  That is why I said, if that's the
only problem, we're lucky.  The -Werror failures change.

The patch is okay, but it doesn't remove the need to recommend
--disable-werror.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/98139] varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
  2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-12-04 13:46 ` dje at gcc dot gnu.org
@ 2020-12-05 22:10 ` dje at gcc dot gnu.org
  2020-12-07 11:52 ` ro at CeBiTec dot Uni-Bielefeld.DE
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2020-12-05 22:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from David Edelsohn <dje at gcc dot gnu.org> ---
Patch applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/98139] varasm.c fails to compile on AIX 7.2: -Werror=unused-variable
  2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-12-05 22:10 ` dje at gcc dot gnu.org
@ 2020-12-07 11:52 ` ro at CeBiTec dot Uni-Bielefeld.DE
  6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2020-12-07 11:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98139

--- Comment #7 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> ---
> It has nothing to do with the proper way to install GCC on AIX.

Why not?  Consider some developer trying to build trunk on his own AIX
system: he'd run into the same issue, but wouldn't think of (in fact
wouldn't even know about) the cfarm wiki.

> It was not the only -Werror failure on AIX.  That is why I said, if that's the
> only problem, we're lucky.  The -Werror failures change.

FWIW, I've now finished an --enable-languages=all (except ada) build on
gcc119 without --disable-werror and there were no further issues (well,
there are PRs go/98170 and ada/98171).

> The patch is okay, but it doesn't remove the need to recommend
> --disable-werror.

At least for now that need seems to be gone.  Thanks for installing the
patch.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-07 11:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 11:51 [Bug target/98139] New: varasm.c fails to compile on AIX 7.2: -Werror=unused-variable ro at gcc dot gnu.org
2020-12-04 11:52 ` [Bug target/98139] " ro at gcc dot gnu.org
2020-12-04 13:00 ` dje at gcc dot gnu.org
2020-12-04 13:39 ` rguenth at gcc dot gnu.org
2020-12-04 13:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
2020-12-04 13:46 ` dje at gcc dot gnu.org
2020-12-05 22:10 ` dje at gcc dot gnu.org
2020-12-07 11:52 ` ro at CeBiTec dot Uni-Bielefeld.DE

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).