public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2
@ 2013-04-04  9:46 mustrumr97 at gmail dot com
  2013-04-04 13:46 ` [Bug c++/56838] " jason at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mustrumr97 at gmail dot com @ 2013-04-04  9:46 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56838
           Summary: GCC svn doesn't compile libreoffice 4.0.1.2
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mustrumr97@gmail.com


Created attachment 29802
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29802
preprocessed source code

This is the command line
x86_64-pc-linux-gnu-g++ -DCPPU_ENV=gcc3 -DENABLE_GRAPHITE -DENABLE_GTK -DGCC
-DHAVE_CXX11_PERFECT_FORWARDING -DHAVE_GCC_BUILTIN_ATOMIC
-DHAVE_THREADSAFE_STATICS -DLIBO_INTERNAL_ONLY -DLINUX -DNDEBUG -DOPTIMIZE
-DOSL_DEBUG_LEVEL=0 -DSOLAR_JAVA -DSUPD=400 -DUNIX -DUNX -DX86_64 -D_PTHREADS
-D_REENTRANT -DFORCE_SYSALLOC -DSAL_DLLIMPLEMENTATION -DRTL_OS="Linux"
-DRTL_ARCH="X86_64" -DHAVE_GCC_VISIBILITY_FEATURE -fvisibility=hidden -Wall
-Wendif-labels -Wextra -fmessage-length=0 -fno-common -pipe
-fvisibility-inlines-hidden -DLIBO_MERGELIBS -fPIC -Wshadow -Wsign-promo
-Woverloaded-virtual -Wnon-virtual-dtor -std=gnu++0x -DEXCEPTIONS_ON
-fexceptions -fno-enforce-eh-specs -O2 -pipe -c
/tmp/libreoffice-4.0.1.2/sal/osl/all/debugbase.cxx -o
/tmp/libreoffice-4.0.1.2/workdir/unxlngx6.pro/CxxObject/sal/osl/all/debugbase.o
-I/tmp/libreoffice-4.0.1.2/sal/osl/all/
-I/tmp/libreoffice-4.0.1.2/solver/unxlngx6.pro/inc/external
-I/tmp/libreoffice-4.0.1.2/solver/unxlngx6.pro/inc
-I/tmp/libreoffice-4.0.1.2/solenv/inc -I/opt/icedtea-bin-7.2.3.8/include
-I/opt/icedtea-bin-7.2.3.8/include/linux
-I/opt/icedtea-bin-7.2.3.8/include/native_threads/include
-I/tmp/libreoffice-4.0.1.2/config -I/tmp/libreoffice-4.0.1.2/sal/inc

Here is the error:
In file included from /usr/include/boost/bind.hpp:22:0,
                 from /tmp/libreoffice-4.0.1.2/sal/osl/all/debugbase.cxx:26:
/usr/include/boost/bind/bind.hpp: In instantiation of ‘struct
boost::_bi::result_traits<boost::_bi::unspecified, bool (*)(const char*, const
rtl::OString&)>’:
/usr/include/boost/bind/bind_template.hpp:15:48:   required from ‘class
boost::_bi::bind_t<boost::_bi::unspecified, bool (*)(const char*, const
rtl::OString&), boost::_bi::list2<boost::_bi::value<const char*>, boost::arg<1>
> >’
/usr/include/boost/bind/bind.hpp:1480:5:   required by substitution of
‘template<class F, class A1, class A2>
boost::_bi::bind_t<boost::_bi::unspecified, F, typename
boost::_bi::list_av_2<A1, A2>::type> boost::bind(F, A1, A2) [with F = bool
(*)(const char*, const rtl::OString&); A1 = const char*; A2 = boost::arg<1>]’
/tmp/libreoffice-4.0.1.2/sal/osl/all/debugbase.cxx:107:60:   required from here
/usr/include/boost/bind/bind.hpp:69:37: error: ‘bool (*)(const char*, const
rtl::OString&)’ is not a class, struct, or union type

gcc doesn't select the right function overload for boost::bind. clang compiles
this.
>From gcc-bugs-return-419247-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 04 09:51:52 2013
Return-Path: <gcc-bugs-return-419247-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23665 invoked by alias); 4 Apr 2013 09:51:52 -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 23636 invoked by uid 48); 4 Apr 2013 09:51:46 -0000
From: "mustrumr97 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/53786] [C++11] alias template - error on valid code
Date: Thu, 04 Apr 2013 09:51: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-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mustrumr97 at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: Version Summary
Message-ID: <bug-53786-4-tzE6hjW1uj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-53786-4@http.gcc.gnu.org/bugzilla/>
References: <bug-53786-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00392.txt.bz2
Content-length: 980


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

Hristo Venev <mustrumr97 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.7.1                       |4.9.0
            Summary|[C++11] alias template      |[C++11] alias template -
                   |causes g++ segfault         |error on valid code

--- Comment #5 from Hristo Venev <mustrumr97 at gmail dot com> 2013-04-04 09:51:45 UTC ---
Now the compiler gives an error on the same code

fail.cpp: In substitution of ‘template<class T, class ... Ts> using Tail =
List<Ts ...> [with T = Ts ...; Ts = {Ts ...}]’:
fail.cpp:6:23:   required from here
fail.cpp:4:23: error: template argument 1 is invalid
 using Tail=List<Ts...>;
                       ^
fail.cpp:7:9: error: expected type-specifier before ‘Tail2’
 using A=Tail2<int, char, char>;
>From gcc-bugs-return-419248-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 04 10:06:51 2013
Return-Path: <gcc-bugs-return-419248-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29494 invoked by alias); 4 Apr 2013 10:06:51 -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 29424 invoked by uid 48); 4 Apr 2013 10:06:44 -0000
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/53786] [C++11] alias template - error on valid code
Date: Thu, 04 Apr 2013 10:06: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-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo.carlini at oracle dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: CC
Message-ID: <bug-53786-4-xqka9GtGeg@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-53786-4@http.gcc.gnu.org/bugzilla/>
References: <bug-53786-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00393.txt.bz2
Content-length: 456


http://gcc.gnu.org/bugzilla/show_bug.cgi?idS786

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

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

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-04-04 10:06:44 UTC ---
All the testcases ICE mainline.


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

* [Bug c++/56838] GCC svn doesn't compile libreoffice 4.0.1.2
  2013-04-04  9:46 [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2 mustrumr97 at gmail dot com
@ 2013-04-04 13:46 ` jason at gcc dot gnu.org
  2013-04-04 16:17 ` mustrumr97 at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-04 13:46 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-04 13:46:04 UTC ---
GCC 4.8.0 also accepts this testcase.

The problem on the trunk is that G++ has started instantiating return types in
order to cause a substitution failure if the return type is an abstract class.

In this case, we've deduced template arguments for boost::bind(F, A1, A2) and
are substituting them in to produce a candidate; we haven't selected a
candidate yet.

During the substitution, we instantiate boost::_bi::bind_t to determine whether
it is abstract, and this leads to the error you're seeing.

This is new behavior for G++, but it seems to be what the standard requires. 
But perhaps that's a defect.  It certainly seems to be causing headaches.


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

* [Bug c++/56838] GCC svn doesn't compile libreoffice 4.0.1.2
  2013-04-04  9:46 [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2 mustrumr97 at gmail dot com
  2013-04-04 13:46 ` [Bug c++/56838] " jason at gcc dot gnu.org
@ 2013-04-04 16:17 ` mustrumr97 at gmail dot com
  2013-04-05 14:37 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mustrumr97 at gmail dot com @ 2013-04-04 16:17 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Hristo Venev <mustrumr97 at gmail dot com> 2013-04-04 16:17:04 UTC ---
The candidate in /usr/include/boost/bind/bind.hpp:1478 a.cpp:92092 fails.
SFINAE so this candidate is skipped.
However the one in /usr/include/boost/bind/bind_cc.hpp:35 a.cpp:92176 would
instantiate successfully. I think this is the one called by gcc 4.8.0.


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

* [Bug c++/56838] GCC svn doesn't compile libreoffice 4.0.1.2
  2013-04-04  9:46 [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2 mustrumr97 at gmail dot com
  2013-04-04 13:46 ` [Bug c++/56838] " jason at gcc dot gnu.org
  2013-04-04 16:17 ` mustrumr97 at gmail dot com
@ 2013-04-05 14:37 ` jason at gcc dot gnu.org
  2013-04-09  1:29 ` [Bug c++/56838] [4.9 regression] " jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-05 14:37 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-05 14:37:52 UTC ---
(In reply to comment #2)
> The candidate in /usr/include/boost/bind/bind.hpp:1478 a.cpp:92092 fails.
> SFINAE so this candidate is skipped.

Actually, it doesn't fail SFINAE.  If the the candidate at a.cpp:92176 is
removed, 4.7.2 and 4.8.0 will choose the one at a.cpp:92092 and then get the
same error message.  In those compilers, both are valid candidates, but the
later one is preferred by the partial ordering rules, and so we don't
instantiate the earlier one and we don't get the error.

But then I changed G++ to enforce the rule that forming a function type with an
abstract return type causes deduction to fail.  In order to check that, we need
to instantiate the return type so that we can tell whether or not it is
abstract.  This happens while generating the candidate, and that's what causes
the error.

It seems to me that instead of having all those overloads of bind() for
different numbers of function parameters, boost ought to have partial
specializations of result_traits, i.e.

  template <class R, class B1, class B2>
  struct result_traits<unspecified, R (*)(B1, B2)>
  {
    typedef R type;
  }; 

which would make the first overload well-formed.


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

* [Bug c++/56838] [4.9 regression] GCC svn doesn't compile libreoffice 4.0.1.2
  2013-04-04  9:46 [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2 mustrumr97 at gmail dot com
                   ` (2 preceding siblings ...)
  2013-04-05 14:37 ` jason at gcc dot gnu.org
@ 2013-04-09  1:29 ` jason at gcc dot gnu.org
  2013-04-09 12:33 ` jason at gcc dot gnu.org
  2020-12-09 13:55 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-09  1:29 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Depends on|                            |17232
         Resolution|                            |FIXED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.9.0
            Summary|GCC svn doesn't compile     |[4.9 regression] GCC svn
                   |libreoffice 4.0.1.2         |doesn't compile libreoffice
                   |                            |4.0.1.2

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-09 01:29:23 UTC ---
I've disabled instantiation for checking abstractness, pending a ruling from
the committee.


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

* [Bug c++/56838] [4.9 regression] GCC svn doesn't compile libreoffice 4.0.1.2
  2013-04-04  9:46 [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2 mustrumr97 at gmail dot com
                   ` (3 preceding siblings ...)
  2013-04-09  1:29 ` [Bug c++/56838] [4.9 regression] " jason at gcc dot gnu.org
@ 2013-04-09 12:33 ` jason at gcc dot gnu.org
  2020-12-09 13:55 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-09 12:33 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zeratul976 at hotmail dot
                   |                            |com

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-09 12:32:58 UTC ---
*** Bug 56886 has been marked as a duplicate of this bug. ***


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

* [Bug c++/56838] [4.9 regression] GCC svn doesn't compile libreoffice 4.0.1.2
  2013-04-04  9:46 [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2 mustrumr97 at gmail dot com
                   ` (4 preceding siblings ...)
  2013-04-09 12:33 ` jason at gcc dot gnu.org
@ 2020-12-09 13:55 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2020-12-09 13:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56838
Bug 56838 depends on bug 17232, which changed state.

Bug 17232 Summary: [DR 1640] classes and class template specializations treated differently w.r.t. core issue #337
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17232

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

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

end of thread, other threads:[~2020-12-09 13:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04  9:46 [Bug c++/56838] New: GCC svn doesn't compile libreoffice 4.0.1.2 mustrumr97 at gmail dot com
2013-04-04 13:46 ` [Bug c++/56838] " jason at gcc dot gnu.org
2013-04-04 16:17 ` mustrumr97 at gmail dot com
2013-04-05 14:37 ` jason at gcc dot gnu.org
2013-04-09  1:29 ` [Bug c++/56838] [4.9 regression] " jason at gcc dot gnu.org
2013-04-09 12:33 ` jason at gcc dot gnu.org
2020-12-09 13:55 ` jason 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).