Re: [gofrontend-dev] Re: Go patch committed: Fix error reporting for invalid builtin calls
Now I get ../../../gcc/libgo/runtime/mprof.goc: In function ‘runtime_Stack’: ../../../gcc/libgo/runtime/mprof.goc:437:19: error: ‘enablegc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] mstats.enablegc = enablegc; ^ ../../../gcc/libgo/runtime/mprof.goc:406:7: note: ‘enablegc’ was declared here bool enablegc; ^ Am I doing something wrong? Cheers, mwh On 4 August 2015 at 05:55, Ian Lance Taylor i...@golang.org wrote: On Mon, Aug 3, 2015 at 2:10 AM, Andreas Schwab sch...@suse.de wrote: ../../../libgo/runtime/mprof.goc: In function 'runtime_Stack': ../../../libgo/runtime/mprof.goc:408:5: error: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Werror=frame-address] sp = runtime_getcallersp(b); Fixed by this patch by Chris Manghane. The call was not actually necessary. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. This fixes PR 67101. Ian -- You received this message because you are subscribed to the Google Groups gofrontend-dev group. To unsubscribe from this group and stop receiving emails from it, send an email to gofrontend-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [gofrontend-dev] Re: Go patch committed: Fix error reporting for invalid builtin calls
On Mon, Aug 3, 2015 at 7:24 PM, Michael Hudson-Doyle michael.hud...@canonical.com wrote: Now I get ../../../gcc/libgo/runtime/mprof.goc: In function ‘runtime_Stack’: ../../../gcc/libgo/runtime/mprof.goc:437:19: error: ‘enablegc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] mstats.enablegc = enablegc; ^ ../../../gcc/libgo/runtime/mprof.goc:406:7: note: ‘enablegc’ was declared here bool enablegc; I don't know why I am not seeing this, but I've committed this patch that should fix it. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 226533) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -a850225433a66a58613c22185c3b09626f5545eb +bdd98c601f2c8dbd0bf821548ba09c038f7645c4 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/runtime/mprof.goc === --- libgo/runtime/mprof.goc (revision 226525) +++ libgo/runtime/mprof.goc (working copy) @@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int func Stack(b Slice, all bool) (n int) { byte *pc; - bool enablegc; + bool enablegc = false; pc = (byte*)(uintptr)runtime_getcallerpc(b);