Thanks you're right, thought I checked but turned out there was still a 
lingering printf in my code... All working now, appreciate it! :)

________________________________
From: Jonathan Wakely <jwakely....@gmail.com>
Sent: 21 August 2025 14:42:30
To: Thomas de Bock
Cc: gcc@gcc.gnu.org
Subject: [ext] Re: DejaGnu fail despite equivalent output binaries

On Thu, 21 Aug 2025 at 15:39, Thomas de Bock via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hey, I'm working on an optimization pass that merges the comparisons in 
> defaulted struct equality operators, the spaceship-* testcases all pass, 
> except for spaceship-eq12.C:
>
>
> FAIL: g++.dg/cpp2a/spaceship-eq12.C  -std=gnu++20 (test for excess errors)
> FAIL: g++.dg/cpp2a/spaceship-eq12.C  -std=gnu++26 (test for excess errors)
> FAIL: g++.dg/cpp2a/spaceship-eq12.C  -std=gnu++23 (test for excess errors)
>
>                 === g++ Summary ===
>
> # of expected passes            209
> # of unexpected failures        3
> /home/tdebock/gcc-vectorize/gcc/objdir/gcc/xg++  version 16.0.0 20250704 
> (experimental) (GCC)
>
>
> This confuses me, since when compiling the testcase with, and without the 
> optimization enabled and running them, they both return the same value.
>
> This is not surprising since they are the exact same binaries:
>
> > sha1sum test_optimization_off
> c45352213dd39a6a3b32d3549b40aeb9a17db464  test_optimization_off
> > sha1sum test_optimization_on
> c45352213dd39a6a3b32d3549b40aeb9a17db464  test_optimization_on
>
>
> The only thing the optimization does on this testcase is, during the SSA 
> pass, switch the != operators on component refs out for ==, switching the 
> basic blocks' edges as well.
>
> Does DejaGnu test some attributes about the intermediate languages as well, 
> what is going on here?

"test for excess errors" means it is checking the output of the
compilation (and linking) for unexpected diagnostics. Any unexpected
warnings or errors will cause it to fail. Failure to compile the code
will also cause that error, but in that case you'd see other errors
too (and you wouldn't be able to run the binary!)

It has nothing to do with the binary or the result of executing the
binary, it's just what the compiler prints while compiling it. Look in
the logs, you should see what the excess errors are.

This e-mail and any attachments may contain information that is confidential 
and proprietary and otherwise protected from disclosure. If you are not the 
intended recipient of this e-mail, do not read, duplicate or redistribute it by 
any means. Please immediately delete it and any attachments and notify the 
sender that you have received it by mistake. Unintended recipients are 
prohibited from taking action on the basis of information in this e-mail or any 
attachments. The DRW Companies make no representations that this e-mail or any 
attachments are free of computer viruses or other defects.

Reply via email to