public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54437] New: [4.8 Regression]  Revision 190664 causes Firefox build failure
@ 2012-08-31 12:55 markus at trippelsdorf dot de
  2012-08-31 13:08 ` [Bug c++/54437] " markus at trippelsdorf dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2012-08-31 12:55 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54437
           Summary: [4.8 Regression]  Revision 190664 causes Firefox build
                    failure
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


Created attachment 28111
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28111
testcase

Starting with revision 190664 I get the following error when building Firefox:

 $ cc1plus -w -quiet jstypedarray.ii
/var/tmp/mozilla-central/js/src/jstypedarray.cpp: In instantiation of ‘static
JSBool js::DataViewObject::getter(JSContext*, unsigned int, JS::Value*) [with
JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::bufferValue; JSBool = int; JSContext = JSContext]’:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3215:108:   required from
‘static bool js::DataViewObject::defineGetter(JSContext*, js::PropertyName*,
JS::HandleObject) [with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::bufferValue; JSContext = JSContext; JS::HandleObject =
JS::Handle<JSObject*>]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3241:80:   required from here
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: error: no matching
function for call to ‘CallNonGenericMethod(JSContext*&, JS::CallArgs&)’
     return CallNonGenericMethod<is, getterImpl<ValueGetter> >(cx, args);
                                                                       ^
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: note: candidate is:
In file included from /var/tmp/mozilla-central/js/src/jstypedarray.cpp:13:0:
/var/tmp/mozilla-central/js/src/jsapi.h:1556:1: note: template<bool (*
Test)(const JS::Value&), bool (* Impl)(JSContext*, JS::CallArgs)> bool
JS::CallNonGenericMethod(JSContext*, JS::CallArgs)
 CallNonGenericMethod(JSContext *cx, CallArgs args)
 ^
/var/tmp/mozilla-central/js/src/jsapi.h:1556:1: note:   template argument
deduction/substitution failed:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp: In substitution of
‘template<bool (* Test)(const JS::Value&), bool (* Impl)(JSContext*,
JS::CallArgs)> bool JS::CallNonGenericMethod(JSContext*, JS::CallArgs) [with
bool (* Test)(const JS::Value&) = js::DataViewObject::is; bool (*
Impl)(JSContext*, JS::CallArgs) =
js::DataViewObject::getterImpl<js::DataViewObject::bufferValue>]’:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71:   required from
‘static JSBool js::DataViewObject::getter(JSContext*, unsigned int, JS::Value*)
[with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::bufferValue; JSBool = int; JSContext = JSContext]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3215:108:   required from
‘static bool js::DataViewObject::defineGetter(JSContext*, js::PropertyName*,
JS::HandleObject) [with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::bufferValue; JSContext = JSContext; JS::HandleObject =
JS::Handle<JSObject*>]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3241:80:   required from here
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3191:1: error: ‘static bool
js::DataViewObject::getterImpl(JSContext*, JS::CallArgs) [with JS::Value (*
ValueGetter)(js::DataViewObject&) = js::DataViewObject::bufferValue; JSContext
= JSContext]’ is private
 DataViewObject::getterImpl(JSContext *cx, CallArgs args)
 ^
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: error: within this
context
     return CallNonGenericMethod<is, getterImpl<ValueGetter> >(cx, args);
                                                                       ^
/var/tmp/mozilla-central/js/src/jstypedarray.cpp: In instantiation of ‘static
JSBool js::DataViewObject::getter(JSContext*, unsigned int, JS::Value*) [with
JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteLengthValue; JSBool = int; JSContext = JSContext]’:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3215:108:   required from
‘static bool js::DataViewObject::defineGetter(JSContext*, js::PropertyName*,
JS::HandleObject) [with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteLengthValue; JSContext = JSContext; JS::HandleObject =
JS::Handle<JSObject*>]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3244:88:   required from here
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: error: no matching
function for call to ‘CallNonGenericMethod(JSContext*&, JS::CallArgs&)’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: note: candidate is:
In file included from /var/tmp/mozilla-central/js/src/jstypedarray.cpp:13:0:
/var/tmp/mozilla-central/js/src/jsapi.h:1556:1: note: template<bool (*
Test)(const JS::Value&), bool (* Impl)(JSContext*, JS::CallArgs)> bool
JS::CallNonGenericMethod(JSContext*, JS::CallArgs)
 CallNonGenericMethod(JSContext *cx, CallArgs args)
 ^
/var/tmp/mozilla-central/js/src/jsapi.h:1556:1: note:   template argument
deduction/substitution failed:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp: In substitution of
‘template<bool (* Test)(const JS::Value&), bool (* Impl)(JSContext*,
JS::CallArgs)> bool JS::CallNonGenericMethod(JSContext*, JS::CallArgs) [with
bool (* Test)(const JS::Value&) = js::DataViewObject::is; bool (*
Impl)(JSContext*, JS::CallArgs) =
js::DataViewObject::getterImpl<js::DataViewObject::byteLengthValue>]’:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71:   required from
‘static JSBool js::DataViewObject::getter(JSContext*, unsigned int, JS::Value*)
[with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteLengthValue; JSBool = int; JSContext = JSContext]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3215:108:   required from
‘static bool js::DataViewObject::defineGetter(JSContext*, js::PropertyName*,
JS::HandleObject) [with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteLengthValue; JSContext = JSContext; JS::HandleObject =
JS::Handle<JSObject*>]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3244:88:   required from here
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3191:1: error: ‘static bool
js::DataViewObject::getterImpl(JSContext*, JS::CallArgs) [with JS::Value (*
ValueGetter)(js::DataViewObject&) = js::DataViewObject::byteLengthValue;
JSContext = JSContext]’ is private
 DataViewObject::getterImpl(JSContext *cx, CallArgs args)
 ^
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: error: within this
context
     return CallNonGenericMethod<is, getterImpl<ValueGetter> >(cx, args);
                                                                       ^
/var/tmp/mozilla-central/js/src/jstypedarray.cpp: In instantiation of ‘static
JSBool js::DataViewObject::getter(JSContext*, unsigned int, JS::Value*) [with
JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteOffsetValue; JSBool = int; JSContext = JSContext]’:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3215:108:   required from
‘static bool js::DataViewObject::defineGetter(JSContext*, js::PropertyName*,
JS::HandleObject) [with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteOffsetValue; JSContext = JSContext; JS::HandleObject =
JS::Handle<JSObject*>]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3247:88:   required from here
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: error: no matching
function for call to ‘CallNonGenericMethod(JSContext*&, JS::CallArgs&)’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: note: candidate is:
In file included from /var/tmp/mozilla-central/js/src/jstypedarray.cpp:13:0:
/var/tmp/mozilla-central/js/src/jsapi.h:1556:1: note: template<bool (*
Test)(const JS::Value&), bool (* Impl)(JSContext*, JS::CallArgs)> bool
JS::CallNonGenericMethod(JSContext*, JS::CallArgs)
 CallNonGenericMethod(JSContext *cx, CallArgs args)
 ^
/var/tmp/mozilla-central/js/src/jsapi.h:1556:1: note:   template argument
deduction/substitution failed:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp: In substitution of
‘template<bool (* Test)(const JS::Value&), bool (* Impl)(JSContext*,
JS::CallArgs)> bool JS::CallNonGenericMethod(JSContext*, JS::CallArgs) [with
bool (* Test)(const JS::Value&) = js::DataViewObject::is; bool (*
Impl)(JSContext*, JS::CallArgs) =
js::DataViewObject::getterImpl<js::DataViewObject::byteOffsetValue>]’:
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71:   required from
‘static JSBool js::DataViewObject::getter(JSContext*, unsigned int, JS::Value*)
[with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteOffsetValue; JSBool = int; JSContext = JSContext]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3215:108:   required from
‘static bool js::DataViewObject::defineGetter(JSContext*, js::PropertyName*,
JS::HandleObject) [with JS::Value (* ValueGetter)(js::DataViewObject&) =
js::DataViewObject::byteOffsetValue; JSContext = JSContext; JS::HandleObject =
JS::Handle<JSObject*>]’
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3247:88:   required from here
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3191:1: error: ‘static bool
js::DataViewObject::getterImpl(JSContext*, JS::CallArgs) [with JS::Value (*
ValueGetter)(js::DataViewObject&) = js::DataViewObject::byteOffsetValue;
JSContext = JSContext]’ is private
 DataViewObject::getterImpl(JSContext *cx, CallArgs args)
 ^
/var/tmp/mozilla-central/js/src/jstypedarray.cpp:3204:71: error: within this
context
     return CallNonGenericMethod<is, getterImpl<ValueGetter> >(cx, args);
                                                                       ^
Testcase is attached. I'm currently trying to reduce it further.


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

* [Bug c++/54437] [4.8 Regression]  Revision 190664 causes Firefox build failure
  2012-08-31 12:55 [Bug c++/54437] New: [4.8 Regression] Revision 190664 causes Firefox build failure markus at trippelsdorf dot de
@ 2012-08-31 13:08 ` markus at trippelsdorf dot de
  2012-08-31 16:43 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: markus at trippelsdorf dot de @ 2012-08-31 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-08-31 13:07:54 UTC ---
This is what Creduce came up with:

typedef bool (*IsAcceptableThis)(const int& v);
typedef bool (*NativeImpl)(int *, int);
template<IsAcceptableThis, NativeImpl>void CallNonGenericMethod();
typedef int (*JSNative)(int *, unsigned, int *);
struct A
{};
class B : A {
  static bool                  is(const int& p1);
  template<int(B&)>static bool getterImpl(int *,
                                          int);
  template<int(B&)>static int  getter(int *,
                                      unsigned,
                                      int *);
  template<int(B&)>static bool defineGetter();
  static int                   byteOffsetValue(B&);
  A                          * initClass();
};
A *js_NewFunction(JSNative);
template<int
         ValueGetter(B&)>int
         B::getter(int *, unsigned, int *)
{
  CallNonGenericMethod<is, getterImpl<ValueGetter> >();
}

template<int
         ValueGetter(B&)>
bool
         B::defineGetter()
{
  A *a = js_NewFunction(B::getter<ValueGetter>);
}

A *
B::initClass()
{
  defineGetter<byteOffsetValue>;
}


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

* [Bug c++/54437] [4.8 Regression]  Revision 190664 causes Firefox build failure
  2012-08-31 12:55 [Bug c++/54437] New: [4.8 Regression] Revision 190664 causes Firefox build failure markus at trippelsdorf dot de
  2012-08-31 13:08 ` [Bug c++/54437] " markus at trippelsdorf dot de
@ 2012-08-31 16:43 ` paolo.carlini at oracle dot com
  2012-09-03 10:39 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-08-31 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-08-31 16:43:19 UTC ---
Adding Jason in CC, looks like this is related to the recent SFINAE work...


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

* [Bug c++/54437] [4.8 Regression]  Revision 190664 causes Firefox build failure
  2012-08-31 12:55 [Bug c++/54437] New: [4.8 Regression] Revision 190664 causes Firefox build failure markus at trippelsdorf dot de
  2012-08-31 13:08 ` [Bug c++/54437] " markus at trippelsdorf dot de
  2012-08-31 16:43 ` paolo.carlini at oracle dot com
@ 2012-09-03 10:39 ` rguenth at gcc dot gnu.org
  2012-09-04 14:51 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-03 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
            Version|unknown                     |4.8.0
   Target Milestone|---                         |4.8.0


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

* [Bug c++/54437] [4.8 Regression]  Revision 190664 causes Firefox build failure
  2012-08-31 12:55 [Bug c++/54437] New: [4.8 Regression] Revision 190664 causes Firefox build failure markus at trippelsdorf dot de
                   ` (2 preceding siblings ...)
  2012-09-03 10:39 ` rguenth at gcc dot gnu.org
@ 2012-09-04 14:51 ` jason at gcc dot gnu.org
  2012-09-04 18:50 ` jason at gcc dot gnu.org
  2012-09-04 19:04 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2012-09-04 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-04
     Ever Confirmed|0                           |1

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-09-04 14:51:05 UTC ---
Further reduced:

template <void (*P)()> void f(); 
class A {
  template <class T> static void g();
  template <class T> static void h () { f<g<T> >(); }
  static void i() { h<int>(); }
};


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

* [Bug c++/54437] [4.8 Regression]  Revision 190664 causes Firefox build failure
  2012-08-31 12:55 [Bug c++/54437] New: [4.8 Regression] Revision 190664 causes Firefox build failure markus at trippelsdorf dot de
                   ` (3 preceding siblings ...)
  2012-09-04 14:51 ` jason at gcc dot gnu.org
@ 2012-09-04 18:50 ` jason at gcc dot gnu.org
  2012-09-04 19:04 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2012-09-04 18:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2012-09-04 18:50:03 UTC ---
Author: jason
Date: Tue Sep  4 18:49:51 2012
New Revision: 190946

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190946
Log:
    PR c++/54437
    PR c++/51213
    * pt.c (fn_type_unification): Call coerce_template_parms before
    entering substitution context.

Added:
    trunk/gcc/testsuite/g++.dg/template/access24.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/54437] [4.8 Regression]  Revision 190664 causes Firefox build failure
  2012-08-31 12:55 [Bug c++/54437] New: [4.8 Regression] Revision 190664 causes Firefox build failure markus at trippelsdorf dot de
                   ` (4 preceding siblings ...)
  2012-09-04 18:50 ` jason at gcc dot gnu.org
@ 2012-09-04 19:04 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2012-09-04 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-09-04 19:04:06 UTC ---
Fixed.


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

end of thread, other threads:[~2012-09-04 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 12:55 [Bug c++/54437] New: [4.8 Regression] Revision 190664 causes Firefox build failure markus at trippelsdorf dot de
2012-08-31 13:08 ` [Bug c++/54437] " markus at trippelsdorf dot de
2012-08-31 16:43 ` paolo.carlini at oracle dot com
2012-09-03 10:39 ` rguenth at gcc dot gnu.org
2012-09-04 14:51 ` jason at gcc dot gnu.org
2012-09-04 18:50 ` jason at gcc dot gnu.org
2012-09-04 19:04 ` 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).