public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
@ 2015-03-22 13:04 ` manu at gcc dot gnu.org
  2015-03-22 15:02 ` jan.kratochvil at redhat dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu.org @ 2015-03-22 13:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-linux-gnu            |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-22
                 CC|                            |jason at redhat dot com,
                   |                            |manu at gcc dot gnu.org,
                   |                            |paolo.carlini at oracle dot com
     Ever confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
The return value is optimized to 0 even before reaching GIMPLE, so this can
definitely be warned by the C++ FE.
>From gcc-bugs-return-481106-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 22 10:44:45 2015
Return-Path: <gcc-bugs-return-481106-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2480 invoked by alias); 22 Mar 2015 10:44:45 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 2445 invoked by uid 48); 22 Mar 2015 10:44:41 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65509] [C++11] GCC rejects operator== with two distinct pointers as not constexpr
Date: Sun, 22 Mar 2015 13:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65509-4-OOXCcVsCCh@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65509-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65509-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg02250.txt.bz2
Content-length: 151

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide509

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started I think with r218462.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
  2015-03-22 13:04 ` [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer manu at gcc dot gnu.org
@ 2015-03-22 15:02 ` jan.kratochvil at redhat dot com
  2015-03-22 17:00 ` manu at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-03-22 15:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
It should check the '!&r' condition which makes no sense.  The variable
initialization in real world programs is too complicated to be able to figure
out it may be NULL.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
  2015-03-22 13:04 ` [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer manu at gcc dot gnu.org
  2015-03-22 15:02 ` jan.kratochvil at redhat dot com
@ 2015-03-22 17:00 ` manu at gcc dot gnu.org
  2015-03-22 18:56 ` jan.kratochvil at redhat dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu.org @ 2015-03-22 17:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I got confused by Clang's message. The problem is not the pointer or NULL. The
problem is converting the address of a reference to bool:


int fii(int *p) {
  int &r=*p;
  return !&r;
}

This is trivial to implement in GCC:

manuel@gcc14:~$ ~/test1/221557M/build/gcc/cc1plus -Waddress ~/pr65168.cc
/home/manuel/pr65168.cc:3:12: warning: address of reference ‘r’ may be assumed
to always convert to true because in C++ a reference cannot be bound to
dereferenced null pointer [-Waddress]
   return !&r;
            ^

Does this patch work in your real-world code?

Index: c-common.c
===================================================================
--- c-common.c  (revision 221557)
+++ c-common.c  (working copy)
@@ -4776,11 +4776,18 @@ c_common_truthvalue_conversion (location
        }

     CASE_CONVERT:
       {
        tree totype = TREE_TYPE (expr);
-       tree fromtype = TREE_TYPE (TREE_OPERAND (expr, 0));
+       tree op0 = TREE_OPERAND (expr, 0);
+       tree fromtype = TREE_TYPE (op0);
+
+       if (TREE_CODE (fromtype) == REFERENCE_TYPE
+           && POINTER_TYPE_P (totype) && DECL_P (op0))
+         warning_at (location, OPT_Waddress,
+                     "address of reference %qD may be assumed to always
convert to true"
+                     " because in C++ a reference cannot be bound to
dereferenced null pointer", op0);

        /* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE,
           since that affects how `default_conversion' will behave.  */
        if (TREE_CODE (totype) == REFERENCE_TYPE
            || TREE_CODE (fromtype) == REFERENCE_TYPE)
>From gcc-bugs-return-481130-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 22 16:45:20 2015
Return-Path: <gcc-bugs-return-481130-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 57269 invoked by alias); 22 Mar 2015 16:45:20 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 57232 invoked by uid 48); 22 Mar 2015 16:45:16 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
Date: Sun, 22 Mar 2015 17:02:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65168-4-DiWSUZb61x@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65168-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65168-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg02274.txt.bz2
Content-length: 198

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Or even:

int fii(int p) {
  int &r=p;
  return !&r;
}
>From gcc-bugs-return-481131-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 22 16:52:18 2015
Return-Path: <gcc-bugs-return-481131-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 66103 invoked by alias); 22 Mar 2015 16:52:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 66068 invoked by uid 48); 22 Mar 2015 16:52:12 -0000
From: "nheghathivhistha at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/65516] New: lto1: internal compiler error: in get_odr_type, at ipa-devirt.c:1809
Date: Sun, 22 Mar 2015 17:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: nheghathivhistha at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-65516-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg02275.txt.bz2
Content-length: 11202

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide516

            Bug ID: 65516
           Summary: lto1: internal compiler error: in get_odr_type, at
                    ipa-devirt.c:1809
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nheghathivhistha at gmail dot com

Spidermonkey compilation ICEs lto1, trunk revision 221558.

/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/work/mozjs-24.2.0/js/src/_virtualenv/bin/python
./config/expandlibs_exec.py --depend .deps/.//libmozjs-24.so.pp --target
libmozjs-24.so --uselist --  x86_64-pc-linux-gnu-g++  -Wall -Wpointer-arith
-Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body
-Werror=conversion-null -Wsign-compare -Wno-invalid-offsetof -Wcast-align
-flto=4 -fuse-linker-plugin -O2 -g -pipe -march=core2 -mtune=core2 -fno-rtti
-ffunction-sections -fdata-sections -fno-exceptions -pthread -pipe  -DNDEBUG
-DTRIMMED  -fno-omit-frame-pointer  -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
-fPIC -shared -Wl,-z,defs -Wl,-h,libmozjs-24.so -o libmozjs-24.so
bignum-dtoa.o bignum.o cached-powers.o diy-fp.o double-conversion.o fast-dtoa.o
fixed-dtoa.o strtod.o HashFunctions.o Poison.o SHA1.o Decimal.o
ArgumentsObject.o BytecodeCompiler.o BytecodeEmitter.o CharacterEncoding.o
DateTime.o Debugger.o Eval.o ExecutableAllocator.o FoldConstants.o ForkJoin.o
GlobalObject.o Interpreter.o Intl.o Iteration.o LifoAlloc.o MapObject.o
Marking.o Memory.o Module.o Monitor.o NameFunctions.o Nursery.o Object.o
ObjectImpl.o PageBlock.o ParallelArray.o ParseMaps.o ParseNode.o Parser.o
Probes.o Profilers.o PropertyKey.o RegExp.o RegExpObject.o RegExpStatics.o
RootMarking.o SPSProfiler.o ScopeObject.o SelfHosting.o Shape.o Stack.o
Statistics.o StoreBuffer.o String.o StringBuffer.o TestingFunctions.o
ThreadPool.o TokenStream.o Unicode.o Verifier.o Xdr.o YarrCanonicalizeUCS2.o
YarrInterpreter.o YarrPattern.o YarrSyntaxChecker.o Zone.o jsalloc.o
jsanalyze.o jsapi.o jsarray.o jsatom.o jsbool.o jsclone.o jscntxt.o
jscompartment.o jscrashreport.o jsdate.o jsdbgapi.o jsdtoa.o jsexn.o
jsfriendapi.o jsfun.o jsgc.o jsinfer.o jsiter.o jsmath.o jsmemorymetrics.o
jsnativestack.o jsnum.o jsobj.o json.o jsonparser.o jsopcode.o jsperf.o jsprf.o
jspropertytree.o jsproxy.o jsreflect.o jsscript.o jsstr.o jstypedarray.o
jsutil.o jswatchpoint.o jsweakmap.o jsworkers.o jswrapper.o prmjtime.o
sharkctl.o ExecutableAllocatorPosix.o OSAllocatorPosix.o pm_linux.o
-lpthread -Wl,-flto -fuse-linker-plugin -Wl,--as-needed -Wl,-O2
-Wl,--sort-common -Wl,--hash-style=gnu -O2 -g -pipe -march=core2 -mtune=core2
-Wl,--build-id   -Wl,-rpath-link,./dist/bin -Wl,-rpath-link,/usr/lib   -lplds4
-lplc4 -lnspr4 -lpthread -ldl -Wl,-version-script,symverscript -licui18n
-licuuc -licudata   -ldl  -lm -lz -ldl
Executing: x86_64-pc-linux-gnu-g++ -Wall -Wpointer-arith -Woverloaded-virtual
-Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null
-Wsign-compare -Wno-invalid-offsetof -Wcast-align -flto=4 -fuse-linker-plugin
-O2 -g -pipe -march=core2 -mtune=core2 -fno-rtti -ffunction-sections
-fdata-sections -fno-exceptions -pthread -pipe -DNDEBUG -DTRIMMED
-fno-omit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -fPIC
-shared -Wl,-z,defs -Wl,-h,libmozjs-24.so -o libmozjs-24.so
/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/work/mozjs-24.2.0/js/src/tmpA0RSz7.list
-lpthread -Wl,-flto -fuse-linker-plugin -Wl,--as-needed -Wl,-O2
-Wl,--sort-common -Wl,--hash-style=gnu -O2 -g -pipe -march=core2 -mtune=core2
-Wl,--build-id -Wl,-rpath-link,./dist/bin -Wl,-rpath-link,/usr/lib -lplds4
-lplc4 -lnspr4 -lpthread -ldl -Wl,-version-script,symverscript -licui18n
-licuuc -licudata -ldl -lm -lz -ldl
/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/work/mozjs-24.2.0/js/src/tmpA0RSz7.list:
    INPUT("bignum-dtoa.o")
    INPUT("bignum.o")
    INPUT("cached-powers.o")
    INPUT("diy-fp.o")
    INPUT("double-conversion.o")
    INPUT("fast-dtoa.o")
    INPUT("fixed-dtoa.o")
    INPUT("strtod.o")
    INPUT("HashFunctions.o")
    INPUT("Poison.o")
    INPUT("SHA1.o")
    INPUT("Decimal.o")
    INPUT("ArgumentsObject.o")
    INPUT("BytecodeCompiler.o")
    INPUT("BytecodeEmitter.o")
    INPUT("CharacterEncoding.o")
    INPUT("DateTime.o")
    INPUT("Debugger.o")
    INPUT("Eval.o")
    INPUT("ExecutableAllocator.o")
    INPUT("FoldConstants.o")
    INPUT("ForkJoin.o")
    INPUT("GlobalObject.o")
    INPUT("Interpreter.o")
    INPUT("Intl.o")
    INPUT("Iteration.o")
    INPUT("LifoAlloc.o")
    INPUT("MapObject.o")
    INPUT("Marking.o")
    INPUT("Memory.o")
    INPUT("Module.o")
    INPUT("Monitor.o")
    INPUT("NameFunctions.o")
    INPUT("Nursery.o")
    INPUT("Object.o")
    INPUT("ObjectImpl.o")
    INPUT("PageBlock.o")
    INPUT("ParallelArray.o")
    INPUT("ParseMaps.o")
    INPUT("ParseNode.o")
    INPUT("Parser.o")
    INPUT("Probes.o")
    INPUT("Profilers.o")
    INPUT("PropertyKey.o")
    INPUT("RegExp.o")
    INPUT("RegExpObject.o")
    INPUT("RegExpStatics.o")
    INPUT("RootMarking.o")
    INPUT("SPSProfiler.o")
    INPUT("ScopeObject.o")
    INPUT("SelfHosting.o")
    INPUT("Shape.o")
    INPUT("Stack.o")
    INPUT("Statistics.o")
    INPUT("StoreBuffer.o")
    INPUT("String.o")
    INPUT("StringBuffer.o")
    INPUT("TestingFunctions.o")
    INPUT("ThreadPool.o")
    INPUT("TokenStream.o")
    INPUT("Unicode.o")
    INPUT("Verifier.o")
    INPUT("Xdr.o")
    INPUT("YarrCanonicalizeUCS2.o")
    INPUT("YarrInterpreter.o")
    INPUT("YarrPattern.o")
    INPUT("YarrSyntaxChecker.o")
    INPUT("Zone.o")
    INPUT("jsalloc.o")
    INPUT("jsanalyze.o")
    INPUT("jsapi.o")
    INPUT("jsarray.o")
    INPUT("jsatom.o")
    INPUT("jsbool.o")
    INPUT("jsclone.o")
    INPUT("jscntxt.o")
    INPUT("jscompartment.o")
    INPUT("jscrashreport.o")
    INPUT("jsdate.o")
    INPUT("jsdbgapi.o")
    INPUT("jsdtoa.o")
    INPUT("jsexn.o")
    INPUT("jsfriendapi.o")
    INPUT("jsfun.o")
    INPUT("jsgc.o")
    INPUT("jsinfer.o")
    INPUT("jsiter.o")
    INPUT("jsmath.o")
    INPUT("jsmemorymetrics.o")
    INPUT("jsnativestack.o")
    INPUT("jsnum.o")
    INPUT("jsobj.o")
    INPUT("json.o")
    INPUT("jsonparser.o")
    INPUT("jsopcode.o")
    INPUT("jsperf.o")
    INPUT("jsprf.o")
    INPUT("jspropertytree.o")
    INPUT("jsproxy.o")
    INPUT("jsreflect.o")
    INPUT("jsscript.o")
    INPUT("jsstr.o")
    INPUT("jstypedarray.o")
    INPUT("jsutil.o")
    INPUT("jswatchpoint.o")
    INPUT("jsweakmap.o")
    INPUT("jsworkers.o")
    INPUT("jswrapper.o")
    INPUT("prmjtime.o")
    INPUT("sharkctl.o")
    INPUT("ExecutableAllocatorPosix.o")
    INPUT("OSAllocatorPosix.o")
    INPUT("pm_linux.o")

lto1: internal compiler error: in get_odr_type, at ipa-devirt.c:1809
lto1: internal compiler error: in get_odr_type, at ipa-devirt.c:1809
lto1: internal compiler error: in get_odr_type, at ipa-devirt.c:1809
lto1: internal compiler error: in get_odr_type, at ipa-devirt.c:1809
Please submit a full bug report,
with preprocessed source if appropriate.
Please submit a full bug report,
with preprocessed source if appropriate.
Please submit a full bug report,
with preprocessed source if appropriate.
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
See <https://bugs.gentoo.org/> for instructions.
See <https://bugs.gentoo.org/> for instructions.
See <https://bugs.gentoo.org/> for instructions.
make[2]: ***
[/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/temp/ccoWodiH.ltrans2.ltrans.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: ***
[/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/temp/ccoWodiH.ltrans3.ltrans.o]
Error 1
make[2]: ***
[/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/temp/ccoWodiH.ltrans0.ltrans.o]
Error 1
make[2]: ***
[/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/temp/ccoWodiH.ltrans1.ltrans.o]
Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.10.0-pre20150320/../../../../x86_64-pc-linux-gnu/bin/ld:
lto-wrapper failed
collect2: error: ld returned 1 exit status
config/rules.mk:1023: recipe for target 'libmozjs-24.so' failed
make[1]: *** [libmozjs-24.so] Error 1
make[1]: Leaving directory
'/var/tmp/portage/dev-lang/spidermonkey-24.2.0-r2/work/mozjs-24.2.0/js/src'
config/rules.mk:678: recipe for target 'default' failed
make: *** [default] Error 2
 * ERROR: dev-lang/spidermonkey-24.2.0-r2::gentoo failed (compile phase):
 *   emake failed

gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.10.0-pre20150320/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.10.0-pre20150320/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.10.0_pre20150320/work/gcc-4.10.0-20150320/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.10.0-pre20150320
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.10.0-pre20150320/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.10.0-pre20150320
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.10.0-pre20150320/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.10.0-pre20150320/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.10.0-pre20150320/include/g++-v4
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.10.0-pre20150320/python
--enable-languages=c,c++,fortran,ada --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.10.0_pre20150320' --enable-libstdcxx-time
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
--disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj
--enable-libgomp --disable-libmudflap --disable-libssp --enable-lto
--with-cloog --disable-isl-version-check --enable-libsanitizer
Thread model: posix
gcc version 4.10.0-pre20150320 20150321 (experimental) [trunk revision 221558]
(Gentoo 4.10.0_pre20150320)

Two or three object files are needed to reproduce it, I will attach ii files.

x86_64-pc-linux-gnu-g++  -fuse-linker-plugin -O2 -g -pipe -march=core2
-mtune=core2 -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions
-pthread -pipe  -DNDEBUG -DTRIMMED  -fno-omit-frame-pointer
-DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -fPIC -Wl,-z,defs
-Wl,-h,libmozjs-24.so -o libmozjs-24.so  Debugger.o GlobalObject.o Marking.o
Shape.o  -r -nostdliblto1: internal compiler error: in get_odr_type, at
ipa-devirt.c:1809
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
lto-wrapper: fatal error:
/usr/x86_64-pc-linux-gnu/gcc-bin/4.10.0-pre20150320/x86_64-pc-linux-gnu-g++
returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.10.0-pre20150320/../../../../x86_64-pc-linux-gnu/bin/ld:
lto-wrapper failed
collect2: error: ld returned 1 exit status


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-03-22 17:00 ` manu at gcc dot gnu.org
@ 2015-03-22 18:56 ` jan.kratochvil at redhat dot com
  2015-03-22 19:46 ` manu at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-03-22 18:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #5 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
(In reply to Manuel López-Ibáñez from comment #3)
> Does this patch work in your real-world code?

There were just many tests like:
  if (!&r)
    return 0;
So it should really work, thanks.
>From gcc-bugs-return-481138-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 22 17:32:14 2015
Return-Path: <gcc-bugs-return-481138-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 121961 invoked by alias); 22 Mar 2015 17:32:13 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 121077 invoked by uid 48); 22 Mar 2015 17:32:10 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
Date: Sun, 22 Mar 2015 19:22:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: diagnostic, patch
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords cc
Message-ID: <bug-65168-4-wr7I05PpHQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65168-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65168-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg02282.txt.bz2
Content-length: 626

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |polacek at redhat dot com

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I'm too busy to even test this properly. Perhaps it needs some tweaks to not
warn in some cases. Please, Mareck, Paolo or Jason, feel free to take it.
>From gcc-bugs-return-481139-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 22 18:04:09 2015
Return-Path: <gcc-bugs-return-481139-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 47247 invoked by alias); 22 Mar 2015 18:04:09 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 47181 invoked by uid 48); 22 Mar 2015 18:04:06 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
Date: Sun, 22 Mar 2015 19:41:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: diagnostic, patch
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65168-4-H5ESVc3Bvb@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65168-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65168-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg02283.txt.bz2
Content-length: 493

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide168

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The diagnostic needs rewording, &r is not the address of a reference, it's the
address of whatever the reference is bound to. Please don't add diagnostics
that talk about something that has no meaning in the language.

It's not really relevant that r is a reference, &r takes the address of an
object, so must be non-zero because you can't have an object with address zero.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-03-22 18:56 ` jan.kratochvil at redhat dot com
@ 2015-03-22 19:46 ` manu at gcc dot gnu.org
  2015-03-23  0:14 ` redi at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu.org @ 2015-03-22 19:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #7)
> The diagnostic needs rewording, &r is not the address of a reference, it's
> the address of whatever the reference is bound to. Please don't add
> diagnostics that talk about something that has no meaning in the language.
> 
> It's not really relevant that r is a reference, &r takes the address of an
> object, so must be non-zero because you can't have an object with address
> zero.

Sure, I was trying to make the Clang message a bit more understandable. I got
completely confused by "pointer may be assumed to always convert to true" when
there is no pointer (in my last testcase).

What about "the address of the object bound to 'r' may be assumed to always
convert to true"?

I'm not sure if we can tell that 'r' is bounded to a dereferenced pointer at
the point of warning. If so, then it could print "because in C++ a reference
cannot be bound to a dereferenced null pointer", but this seems less important.

In any case, I just wanted to demonstrate that there is no "technical"
impediment to implement such a diagnostic in GCC. In fact, it is quite trivial.
That is, Clang does not have this warning because of some magic sauce in its
code, but simply because, for some reason, they have succeeded in attracting
developers who have the time to implement such things.
>From gcc-bugs-return-481141-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 22 18:43:31 2015
Return-Path: <gcc-bugs-return-481141-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 82877 invoked by alias); 22 Mar 2015 18:43:31 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 82792 invoked by uid 55); 22 Mar 2015 18:43:27 -0000
From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/59513] [4.8/4.9/5 Regression] Fortran runtime error: Sequential READ or WRITE not allowed after EOF marker, possibly use REWIND or BACKSPACE
Date: Sun, 22 Mar 2015 19:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libfortran
X-Bugzilla-Version: 4.7.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jvdelisle at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P5
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59513-4-A9i61dkg4V@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59513-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59513-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg02285.txt.bz2
Content-length: 492

https://gcc.gnu.org/bugzilla/show_bug.cgi?idY513

--- Comment #28 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Author: jvdelisle
Date: Sun Mar 22 18:42:52 2015
New Revision: 221572

URL: https://gcc.gnu.org/viewcvs?rev"1572&root=gcc&view=rev
Log:
2015-03-22 Jerry DeLisle  <jvdelisle@gcc.gnu.org>

    PR libgfortran/59513
    * io/transfer.c (data_transfer_init): Do not error for
    -std=legacy.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/transfer.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2015-03-22 19:46 ` manu at gcc dot gnu.org
@ 2015-03-23  0:14 ` redi at gcc dot gnu.org
  2015-03-23  0:19 ` manu at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2015-03-23  0:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Great, then my suggestion would be to use exactly the same wording for
references.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2015-03-23  0:14 ` redi at gcc dot gnu.org
@ 2015-03-23  0:19 ` manu at gcc dot gnu.org
  2015-03-23 10:33 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu.org @ 2015-03-23  0:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #11)
> Great, then my suggestion would be to use exactly the same wording for
> references.

I guess the Clang devs added their wording because someone mistakenly assumed
(like in Jan's original testcase) that applying & to a reference bounded to *p,
when p is NULL may return false. That said, I find their wording very
confusing.

Also, above you said that "&r is not the address of a reference, it's the
address of whatever the reference is bound to", thus using the same working
seems confusing.

But I trust the person that submits a proper patch to choose whatever wording
they feel appropriate.
>From gcc-bugs-return-481157-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 22 22:59:02 2015
Return-Path: <gcc-bugs-return-481157-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10316 invoked by alias); 22 Mar 2015 22:59:01 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 10296 invoked by uid 48); 22 Mar 2015 22:58:58 -0000
From: "ikonomisma at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/65518] gcc consumes all memory with -O3
Date: Mon, 23 Mar 2015 00:21:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: minor
X-Bugzilla-Who: ikonomisma at googlemail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: component
Message-ID: <bug-65518-4-cD64NV2vlQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65518-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65518-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg02301.txt.bz2
Content-length: 502

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide518

ikonomisma at googlemail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |tree-optimization

--- Comment #1 from ikonomisma at googlemail dot com ---
A comment on
http://stackoverflow.com/questions/29200652/gcc-consumes-all-memory-when-optimizing-o3
suggests -ftree-vectorize triggers the condition


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2015-03-23  0:19 ` manu at gcc dot gnu.org
@ 2015-03-23 10:33 ` paolo.carlini at oracle dot com
  2015-06-13 16:11 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-23 10:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2015-03-23 10:33 ` paolo.carlini at oracle dot com
@ 2015-06-13 16:11 ` ppalka at gcc dot gnu.org
  2015-06-15  9:20 ` manu at gcc dot gnu.org
  2015-06-15 14:07 ` ppalka at gcc dot gnu.org
  10 siblings, 0 replies; 11+ messages in thread
From: ppalka at gcc dot gnu.org @ 2015-06-13 16:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #13 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Sat Jun 13 16:11:15 2015
New Revision: 224455

URL: https://gcc.gnu.org/viewcvs?rev=224455&root=gcc&view=rev
Log:
Emit -Waddress warnings for comparing address of reference against NULL

gcc/c-family/ChangeLog:

        PR c++/65168
        * c-common.c (c_common_truthvalue_conversion): Warn when
        converting an address of a reference to a truth value.

gcc/cp/ChangeLog:

        PR c++/65168
        * typeck.c (cp_build_binary_op): Warn when comparing an address
        of a reference against NULL.

gcc/testsuite/ChangeLog:

        PR c++/65168
        g++.dg/warn/Walways-true-3.C: New test.



Added:
    trunk/gcc/testsuite/g++.dg/warn/Walways-true-3.C
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2015-06-13 16:11 ` ppalka at gcc dot gnu.org
@ 2015-06-15  9:20 ` manu at gcc dot gnu.org
  2015-06-15 14:07 ` ppalka at gcc dot gnu.org
  10 siblings, 0 replies; 11+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-15  9:20 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 2971 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #14 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Patrick, it seems to me we can close this as FIXED, no?
>From gcc-bugs-return-488979-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 15 09:23:08 2015
Return-Path: <gcc-bugs-return-488979-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 124761 invoked by alias); 15 Jun 2015 09:23:07 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 124692 invoked by uid 48); 15 Jun 2015 09:23:02 -0000
From: "textdirected at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66534] Compilation error of gfortran building on YDL6.2
Date: Mon, 15 Jun 2015 09:23:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: textdirected at gmail dot com
X-Bugzilla-Status: WAITING
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc attachments.created
Message-ID: <bug-66534-4-dMAUrGHir4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66534-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66534-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg01311.txt.bz2
Content-length: 623

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf534

HEMMI, Shigeru <textdirected at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |textdirected at gmail dot com

--- Comment #2 from HEMMI, Shigeru <textdirected at gmail dot com> ---
Created attachment 35780
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id5780&actioníit
The file
`/home/zgzg/gcc-5.1.0/powerpc-unknown-linux-gnu/libgfortran/config.log'

Thanks for the support.
The file attached.
Regards,


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer
       [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2015-06-15  9:20 ` manu at gcc dot gnu.org
@ 2015-06-15 14:07 ` ppalka at gcc dot gnu.org
  10 siblings, 0 replies; 11+ messages in thread
From: ppalka at gcc dot gnu.org @ 2015-06-15 14:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #15 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Yes, thanks.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-06-15 14:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-65168-4@http.gcc.gnu.org/bugzilla/>
2015-03-22 13:04 ` [Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer manu at gcc dot gnu.org
2015-03-22 15:02 ` jan.kratochvil at redhat dot com
2015-03-22 17:00 ` manu at gcc dot gnu.org
2015-03-22 18:56 ` jan.kratochvil at redhat dot com
2015-03-22 19:46 ` manu at gcc dot gnu.org
2015-03-23  0:14 ` redi at gcc dot gnu.org
2015-03-23  0:19 ` manu at gcc dot gnu.org
2015-03-23 10:33 ` paolo.carlini at oracle dot com
2015-06-13 16:11 ` ppalka at gcc dot gnu.org
2015-06-15  9:20 ` manu at gcc dot gnu.org
2015-06-15 14:07 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).