• Resolved

C6000 compiler reports error where it should not

Hi,

I have problem with error reported by C6000 compiler when compiling following code:

#define AVOID_BUG1

#include <boost/container/map.hpp>
#include <boost/container/vector.hpp>

#if !defined(AVOID_BUG1)
namespace bug1 {

struct no_operator { };

// this class allows implicit conversions and makes the following operator
// definition less-preferred than any other such operators that might be found
// via argument-dependent name lookup
struct any { template <class T> any(T const&); };

// when operator BOOST_TT_TRAIT_OP is not available, this one is used
no_operator operator && (const any&, const any&);

} // bug1
#endif

namespace cont = boost::container;

typedef cont::multimap<int,int> Map;
typedef Map::const_iterator T;
typedef cont::vector<T> V;

void f()
{
    V v;
    T t = T();
    v.push_back(t);
}

I think it is compiler defect.

I reproduced this error with cgtools: 7.3.6 and 7.4.2. I am using CCSv5.2.0.00069, SYS/BIOS 6.33.4.39 and simulator C66xxSim.ccxml - C64x+ CPU Cycle Accurate Simulator, Little Endian.

Use case file bug1.cpp

1172.bug1.cpp

Error message from compilers 7.3.6 and 7.4.2 - both the same.

2210.Error_message.txt

Regards.

  • Thank you for submitting a test case.  Because it includes files I do not have installed, I cannot build it.  Please preprocess the file as described here and submit it again.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    Hi,

    lastly I did not attached preprocessed files because when i try it I got message that .pp file type is not allowed.

    So now I have changed extension to txt and here they are:

    8284.with_bug1.txt

    without_bug1.txt - here the line causing an error has been comment out.

    1488.without_bug1.txt

    Regards.

  • In reply to Bogumil Sapinski:

    I can reproduce this behavior.  The test case is too large to give you a quick answer, but I can say that the latest version of the compiler, currently in development, can handle this code.  I suspect that it is indeed a defect in the current compiler.  I've submitted SDSCM00045963 for further analysis.  I do not have any estimate for when a fix would be available.

  • In reply to Archaeologist:

    Hi,

    lastly my colleague has met with the same problem. It throws different error message, but we think that it applies to the same earlier described defect.

    Here is file with example reproducing this error:

    6366.container_pushback.cpp

    If you want to get the error you only need to throw out double negation in following line:

    typename enable_if_c<true_<X>::value && !!true_<BOOST_MOVE_TEMPL_PARAM>::value>::type

  • In reply to Bogumil Sapinski:

    Thank you for this test case.  I added it to the SDOWP entry SDSCM00045963 filed earlier in this thread.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.