public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/66180] [6 Regression] many -Wodr false positives when building LLVM with -flto
Date: Tue, 19 May 2015 17:56:00 -0000	[thread overview]
Message-ID: <bug-66180-4-TxQHGGRoG2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66180-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
/home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:96:12:
warning: type ‘struct pair’ violates one definition rule [-Wodr]
     struct pair
             ^
/home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:96:12: note: a
different type is defined in another translation unit
     struct pair
             ^
/home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:102:11: note:
the first difference of corresponding definitions is field ‘second’
       _T2 second;                /// @c second is a copy of the second object
            ^
/home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:102:11: note:
a field of same name but different type is defined in another translation unit
       _T2 second;                /// @c second is a copy of the second object
            ^
/home/trippels/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp:131:10:
note: type ‘struct GroupInfo’ defined in anonymous namespace can not match type
‘struct GroupInfo’
   struct GroupInfo {
           ^
/home/trippels/llvm/tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp:73:8:
note: the incompatible type defined in anonymous namespace in another
translation unit
 struct GroupInfo {
         ^

This looks like a real LLVM bug.  If you do 

class bar {
  anonymous_namespace_type foo; 
}

then definin bar in non-anonymous namespace in more than one unit is ODR
violation (because the type of field FOO is different in each of units).  I
think that it is what the warning is about: the instantiation is non-anonymous
of type _T2=GroupInfo that is anonymous.
>From gcc-bugs-return-486711-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue May 19 18:00:38 2015
Return-Path: <gcc-bugs-return-486711-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 120495 invoked by alias); 19 May 2015 18:00:38 -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 120341 invoked by uid 55); 19 May 2015 18:00:30 -0000
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66045] ICE on incorrect code with null
Date: Tue, 19 May 2015 18:00: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kargl at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66045-4-PDmdGbeHIf@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66045-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66045-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-05/txt/msg01551.txt.bz2
Content-length: 776

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

--- Comment #3 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Tue May 19 17:59:58 2015
New Revision: 223406

URL: https://gcc.gnu.org/viewcvs?rev"3406&root=gcc&view=rev
Log:
2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/66045
        * expr.c (gfc_check_assign):  Check for assignment of NULL() instead
        of the (intended) pointer assignment.

2015-05-19  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/66045
        * gfortran.dg/null1.f90: New test.

Added:
    branches/gcc-5-branch/gcc/testsuite/gfortran.dg/null1.f90
Modified:
    branches/gcc-5-branch/gcc/fortran/ChangeLog
    branches/gcc-5-branch/gcc/fortran/expr.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


  parent reply	other threads:[~2015-05-19 17:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-17  7:07 [Bug lto/66180] New: " trippels at gcc dot gnu.org
2015-05-17  7:19 ` [Bug lto/66180] " trippels at gcc dot gnu.org
2015-05-17  7:29 ` trippels at gcc dot gnu.org
2015-05-18 12:42 ` rguenth at gcc dot gnu.org
2015-05-19 17:56 ` hubicka at gcc dot gnu.org [this message]
2015-05-19 21:26 ` trippels at gcc dot gnu.org
2015-05-20  5:31 ` trippels at gcc dot gnu.org
2015-05-20 14:16 ` trippels at gcc dot gnu.org
2015-05-21  5:06 ` hubicka at gcc dot gnu.org
2015-05-24 19:38 ` hubicka at gcc dot gnu.org
2015-05-25  5:54 ` trippels at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-66180-4-TxQHGGRoG2@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).