public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack
@ 2012-04-26 23:12 jyasskin at gcc dot gnu.org
  2012-05-21 17:48 ` [Bug c++/53132] " paolo.carlini at oracle dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jyasskin at gcc dot gnu.org @ 2012-04-26 23:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53132

             Bug #: 53132
           Summary: Missing top level in diagnostic's instantiation stack
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jyasskin@gcc.gnu.org


gcc-4.7's diagnostic about a private copy constructor skips some levels in the
template instantiation stack:

$ cat test.cc
#include <utility>
class Uncopyable {  // 2
 public:
  Uncopyable() = default;
 private:
  Uncopyable(const Uncopyable&);  // 6
};
class ContainsUncopyable {
  std::pair<Uncopyable, int> pv;  // 9
};
void foo() {
  ContainsUncopyable c;  // 12
}

$ g++-4.7pre -c -std=c++11 test.cc
.../include/c++/4.7.1/type_traits: In substitution of ‘template<class _From1,
class _To1> static decltype ((__test_aux<_To1>(declval<_From1>()),
std::__sfinae_types::__one())) std::__is_convertible_helper<_From, _To,
false>::__test(int) [with _From1 = _From1; _To1 = _To1; _From = const
Uncopyable&; _To = Uncopyable] [with _From1 = const Uncopyable&; _To1 =
Uncopyable]’:
.../include/c++/4.7.1/type_traits:1258:70:   required from ‘constexpr const
bool std::__is_convertible_helper<const Uncopyable&, Uncopyable, false>::value’
.../include/c++/4.7.1/type_traits:1263:12:   required from ‘struct
std::is_convertible<const Uncopyable&, Uncopyable>’
.../include/c++/4.7.1/type_traits:116:12:   required from ‘struct
std::__and_<std::is_convertible<const Uncopyable&, Uncopyable>,
std::is_convertible<const int&, int> >’
.../include/c++/4.7.1/bits/stl_pair.h:113:38:   required from here
test.cc:6:3: error: ‘Uncopyable::Uncopyable(const Uncopyable&)’ is private
In file included from .../include/c++/4.7.1/bits/move.h:57:0,
                 from .../include/c++/4.7.1/bits/stl_pair.h:61,
                 from .../include/c++/4.7.1/utility:72,
                 from test.cc:1:
.../include/c++/4.7.1/type_traits:1252:2: error: within this context

# 3 more similar errors omitted


This diagnostic is less readable than it should be because it omits the code I
wrote at test.cc:9 or test.cc:12, which caused the template at stl_pair.h:113
to be instantiated.

I've only seen this in C++11 mode because the std::pair enable_if is only
present there.


$ g++-4.7pre --version
g++-4.7pre (GCC) 4.7.1 20120412 (prerelease)


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

* [Bug c++/53132] Missing top level in diagnostic's instantiation stack
  2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
@ 2012-05-21 17:48 ` paolo.carlini at oracle dot com
  2012-05-21 19:31 ` manu at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-21 17:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53132

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-21 16:10:10 UTC ---
Manuel, any idea what is going on here?


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

* [Bug c++/53132] Missing top level in diagnostic's instantiation stack
  2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
  2012-05-21 17:48 ` [Bug c++/53132] " paolo.carlini at oracle dot com
@ 2012-05-21 19:31 ` manu at gcc dot gnu.org
  2014-11-20 16:50 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2012-05-21 19:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53132

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-05-21 18:45:40 UTC ---
(In reply to comment #1)
> Manuel, any idea what is going on here?

Not much. The instantiation context starts from the input_location, and that is
pointing to ../include/c++/4.7.1/type_traits:1252:2. I am not sure that the C++
FE records the information that this started from some user code. Perhaps Jason
knows where this information is stored. 

I tried to figure out at what point input_location is changed from test.cc line
12 to something in type_traits, but it is a mess... I would be very afraid to
just experiment here by changing input_location, since there are likely a lot
of hidden tricks and pitfalls... :-(


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

* [Bug c++/53132] Missing top level in diagnostic's instantiation stack
  2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
  2012-05-21 17:48 ` [Bug c++/53132] " paolo.carlini at oracle dot com
  2012-05-21 19:31 ` manu at gcc dot gnu.org
@ 2014-11-20 16:50 ` paolo.carlini at oracle dot com
  2014-12-19 16:13 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-11-20 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I guess we need an updated reproducer - ideally not including std headers -
because the original one now is simply accepted.


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

* [Bug c++/53132] Missing top level in diagnostic's instantiation stack
  2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-11-20 16:50 ` paolo.carlini at oracle dot com
@ 2014-12-19 16:13 ` paolo.carlini at oracle dot com
  2014-12-19 16:26 ` manu at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-19 16:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot com

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Manuel, shall we close this?


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

* [Bug c++/53132] Missing top level in diagnostic's instantiation stack
  2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-12-19 16:13 ` paolo.carlini at oracle dot com
@ 2014-12-19 16:26 ` manu at gcc dot gnu.org
  2014-12-19 17:25 ` paolo.carlini at oracle dot com
  2015-07-28  9:37 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu.org @ 2014-12-19 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Paolo Carlini from comment #4)
> Manuel, shall we close this?

If there is no self-contained reproducible testcase forthcoming, I would say
yes.
>From gcc-bugs-return-471410-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Dec 19 16:37:06 2014
Return-Path: <gcc-bugs-return-471410-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11323 invoked by alias); 19 Dec 2014 16:37:05 -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 11263 invoked by uid 48); 19 Dec 2014 16:37:00 -0000
From: "gcc at breakpoint dot cc" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/64294] invalid code, zero check gets optimized away
Date: Fri, 19 Dec 2014 16:37:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gcc at breakpoint dot cc
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: cf_known_to_work
Message-ID: <bug-64294-4-SkCDPegZHw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64294-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64294-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: 2014-12/txt/msg02417.txt.bz2
Content-length: 520

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

Sebastian Andrzej Siewior <gcc at breakpoint dot cc> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.2

--- Comment #6 from Sebastian Andrzej Siewior <gcc at breakpoint dot cc> ---
I just reprduced this on arm-linux-gnueabi. Unless there is something wrong
with the code, this isn't x86 specific as the Target suggests.


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

* [Bug c++/53132] Missing top level in diagnostic's instantiation stack
  2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-12-19 16:26 ` manu at gcc dot gnu.org
@ 2014-12-19 17:25 ` paolo.carlini at oracle dot com
  2015-07-28  9:37 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-12-19 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Ok, thanks. I'm going to wait a few more days only.


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

* [Bug c++/53132] Missing top level in diagnostic's instantiation stack
  2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-12-19 17:25 ` paolo.carlini at oracle dot com
@ 2015-07-28  9:37 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-07-28  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|paolo.carlini at oracle dot com    |
         Resolution|---                         |INVALID

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Closing.


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

end of thread, other threads:[~2015-07-28  9:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 23:12 [Bug c++/53132] New: Missing top level in diagnostic's instantiation stack jyasskin at gcc dot gnu.org
2012-05-21 17:48 ` [Bug c++/53132] " paolo.carlini at oracle dot com
2012-05-21 19:31 ` manu at gcc dot gnu.org
2014-11-20 16:50 ` paolo.carlini at oracle dot com
2014-12-19 16:13 ` paolo.carlini at oracle dot com
2014-12-19 16:26 ` manu at gcc dot gnu.org
2014-12-19 17:25 ` paolo.carlini at oracle dot com
2015-07-28  9:37 ` paolo.carlini at oracle dot com

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).