This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14349] New: ICE on function pointer template parameter


Instantiating this code (valid or not? I don't know)

8<--------------------------------------------
  template <typename T, T (*f)(const T &x)>
  struct SimpleFunctionAdapter
  {
    T operator()(const T &x)
    {
      return f(x);
    }
  };
8<--------------------------------------------
with, for example, sin(complex<double>) seems to ICE with the following message:

8<--------------------------------------------
extensions/matrices.cpp:545:   instantiated from here
extensions/matrices.cpp:427: internal compiler error: in tsubst, at cp/pt.c:
   6626
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
8<--------------------------------------------

To reproduce the bug, just use the attached file preprocessed.cxx and the
command line 

8<--------------------------------------------
$ gcc preprocessed.cxx
8<--------------------------------------------

This happened on a Debian gcc build, namely

8<--------------------------------------------
gcc (GCC) 3.3.3 20040125 (prerelease) (Debian)
8<--------------------------------------------

-- 
           Summary: ICE on function pointer template parameter
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ak at ixion dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-linux-gnu
  GCC host triplet: i386-linux-gnu
GCC target triplet: i386-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]