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++/16256] New: Unneeded mangling


template<int N>
struct Result
{
    char mem[N];
};

Result<2> f( int* );

template<class T, int N>
Result< sizeof( f( (T*)0 ) ) > f( T (*t) [N] );

int main()
{
  int a[4];
  int b[ sizeof( f( &a ) ) ];           // Error
}

------
gives:

sorry, unimplemented: call_expr cannot be mangled due to a defect in the C++ ABI

PR 6424 is about the defect.

But this C++ ABI defect should not be visible here. IMHO there is no need to 
mangle the name in this case. 

Perhaps it's a missed optimization.

-- 
           Summary: Unneeded mangling
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: joerg dot richter at pdv-fs dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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