[arch-general] gcc broken - Arch specific, applying optimization incorrectly - may explain unexplained problems
Bastian Beischer
bastian.beischer at rwth-aachen.de
Wed Mar 14 08:44:57 UTC 2018
Hi David,
On Wed, Mar 14, 2018 at 2:44 AM, David C. Rankin
<drankinatty at suddenlinkmail.com> wrote:
>
> On 03/13/2018 03:28 PM, mar77i via arch-general wrote:
> > On 03/13/2018 02:17 AM, PkmX via arch-general wrote:
> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84607
> >
> > Pass -std=... to compiling the programi n question. If it's in clear deviation of what the respective standard dictates, it's a bug.
> >
> >
> > Sent with ProtonMail Secure Email.
> >
>
> Yes, confirmed it was indeed a bug:
>
> $ gcc -Wall -Wextra -pedantic -std=c11 -o bin/infunc2 infunc2.c
> $ ./bin/infunc2
> In main
>
> And, with Jelle van der Waa's suggestion, I loaded clang (which I never
> otherwise install) and it confirms the issue further:
>
> $ clang -Wall -Wextra -pedantic -std=c11 -o infunc2 infunc2.c
> $ ./infunc2
> In func
> In main
>
> The only part I'm unclear on is where in the fix process
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84607 is on getting fixed and
> when that will trickle down to us.
>
The fix is available in the trunk and the gcc7 branch, but there
hasn't been a release yet. It will be in GCC 7.4.0 and GCC 8.1.0 when
they come. If you need the fix before that you need to open a ticket
on bugs.archlinux.org and ask for a backport of that particular
bugfix.
However, whether this will actually solve any real world problems in
your case: I am doubtful. Do you have any specific evidence which
links this particular bug to your symptoms? Please have a look around
the gcc bug tracker: You will see that there are hundreds of compiler
bugs, many of which more severe than the one you have quoted, but that
doesn't mean that Arch actually backports all of these individual
fixes all the time. I'm not saying it's impossible that the fix will
help you, I'm just saying it is not very likely. And if indeed your
symptoms are due to a gcc miscompilation, you would need recompiled
binaries of whatever software causes your problems as well.
>
> --
> David C. Rankin, J.D.,P.E.
Cheers
Bastian
More information about the arch-general
mailing list