This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/55056] [4.8 Regression] -O0 -g missing location for register double var
- From: "jan.kratochvil at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Oct 2012 08:23:20 +0000
- Subject: [Bug debug/55056] [4.8 Regression] -O0 -g missing location for register double var
- Auto-submitted: auto-generated
- References: <bug-55056-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55056
--- Comment #5 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-10-25 08:23:20 UTC ---
(In reply to comment #3)
> -Og -g0 doesn't produce debug info, so it should fail all debugger tests.
> -Og -g should work.
-Og -g0 is needed for GDB testsuite which expects unchanged CFLAGS produce no
DWARF while adding -g to them produces the proper (-Og in this case) dwarf.
>From GCC standpoint it was -Og -g0 -g.
-Og is not usable with GDB testsuite without heavy work on the testsuite.
If this PR is WONTFIXed I can adjust the few GDB testcases to cope with the
missing location with -O0 -g.
(In reply to comment #4)
> Anyway, this "regression" is due to LRA which even for -O0 generates better
> code, CCing Vlad to see why old reload pushed the l var into its own stack
> slot, even when it is register and thus it doesn't have to do that.
For types up to double "register" keyword stores it to int registers like %rbx.
long double is really stored in stack memory in the code so this GDB testcase
intended for register-stored values has nothing to test and it can be skipped
(for long double).
I do not understand why "register" does not keep the value on FPU stack.