[Bug bootstrap/95970] New: gcc/go/gofrontend/types.cc:1474:34: warning: ‘this’ pointer null
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 29 16:00:47 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95970
Bug ID: 95970
Summary: gcc/go/gofrontend/types.cc:1474:34: warning: ‘this’
pointer null
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
Since r11-1697 Go bootstrap fails due to the following warning turned error:
In static member function ‘static Expression* Type::type_descriptor(Gogo*,
Type*)’,
inlined from ‘virtual Expression* Named_type::do_type_descriptor(Gogo*,
Named_type*)’ at /ssd/test/src/gcc/trunk/gcc/go/gofrontend/types.cc:11114:53,
inlined from ‘virtual Expression* Named_type::do_type_descriptor(Gogo*,
Named_type*)’ at /ssd/test/src/gcc/trunk/gcc/go/gofrontend/types.cc:11105:1:
/ssd/test/src/gcc/trunk/gcc/go/gofrontend/types.cc:1474:34: warning: ‘this’
pointer null [-Wnonnull]
1474 | return type->do_type_descriptor(gogo, NULL);
The warning, issued from tree-ssa-ccp.c, is triggered by the use of the null
pointer as the first argument in the following call for the IL below.
_31 = OBJ_TYPE_REF(_30;(struct Type)0B->12) (0B, gogo_12(D), 0B);
Named_type::do_type_descriptor (struct Named_type * const this, struct Gogo *
gogo, struct Named_type * name)
{
struct Expression * D.404029;
struct Expression * ret;
bool _1;
bool _2;
bool _3;
struct Type * _4;
struct Expression * _5;
struct Named_type * iftmp.1259_6;
struct Expression * _14;
struct Expression * _17;
struct Expression * _19;
struct Expression * _20;
struct Named_type * iftmp.1259_21;
struct Named_type * iftmp.1259_22;
struct Expression * _24;
struct Expression * _25;
struct Expression * _27;
struct Expression * _28;
int (*) () * _29;
int (*) () _30;
struct Expression * _31;
<bb 2> :
_1 = this_9(D)->is_error_;
if (_1 != 0)
goto <bb 3>; [INV]
else
goto <bb 4>; [INV]
<bb 3> :
_27 = Expression::make_error (this_9(D)->location_);
_28 = _27;
goto <bb 13>; [INV]
<bb 4> :
if (name_10(D) == 0B)
goto <bb 5>; [INV]
else
goto <bb 9>; [INV]
<bb 5> :
_2 = this_9(D)->is_alias_;
if (_2 != 0)
goto <bb 6>; [INV]
else
goto <bb 9>; [INV]
<bb 6> :
_3 = this_9(D)->seen_alias_;
if (_3 != 0)
goto <bb 7>; [INV]
else
goto <bb 8>; [INV]
<bb 7> :
_19 = Expression::make_error (this_9(D)->location_);
_20 = _19;
goto <bb 13>; [INV]
<bb 8> :
this_9(D)->seen_alias_ = 1;
_29 = MEM[(struct Type *)0B]._vptr.Type;
_30 = MEM[(int (*) () *)_29 + 96B];
_31 = OBJ_TYPE_REF(_30;(struct Type)0B->12) (0B, gogo_12(D), 0B);
_33 = _31;
_14 = _33;
ret_15 = _14;
this_9(D)->seen_alias_ = 0;
_17 = ret_15;
// predicted unlikely by early return (on trees) predictor.
goto <bb 13>; [INV]
More information about the Gcc-bugs
mailing list