19208 – [3.4 Regression] Spurious error about variably modified type (original) (raw)

Description Giovanni Bajo 2004-12-30 13🔞22 UTC

Hello,

the code I will attacch shortly is a (partial) reduction from a multi-thousands line testcase from Boost which fails with 4.0.

This is the link to the failure in the automatic testers: http://ln-s.net/2$N

Comment 2 Steven Bosscher 2004-12-30 13:22:04 UTC

A regression from what? Does 3.4 accept it?

Comment 3 Giovanni Bajo 2004-12-30 13:51:24 UTC

3.4 is broken too, it's a regression from 3.3 actually.

Comment 4 Drea Pinski 2004-12-30 14:27:09 UTC

Reduced testcase: template struct if_t { typedef int type; }; template struct ffff { static const bool value = true; }; template struct bound_member_action { typedef char f[ffff::value ? 1 : 2]; template bound_member_action(CT i, typename if_t::type g) {} }; bound_member_action a(0, 1);

: Search converges between 2004-01-27-trunk (#442) and 2004-01-28-trunk (#443).

Just a note that date is when it started to seg fault. We started to reject this (and not an ICE): : Search converges between 2004-03-01-3.4 (#2) and 2004-03-15-3.4 (#3). : Search converges between 2004-03-01-trunk (#446) and 2004-04-01-trunk (#447).

Comment 5 Steven Solie 2005-01-15 23:10:30 UTC

Please add 3.4.2 to known to fail list.

7.Code:test> g++ -c bound_member.cpp bound_member.cpp: In instantiation of bound_member_action<int>': bound_member.cpp:10: instantiated from here bound_member.cpp:8: error: char[(ffff::value ? 1 : 2)]' is a variably modified type bound_member.cpp:8: error: trying to instantiate template<class C> struct if_t' bound_member.cpp:10: error: no matching function for call to bound_member_action::bound_member_action(int, int)' bound_member.cpp:5: note: candidates are: bound_member_action::bound_member_action(const bound_member_action&)

g++ (GCC) 3.4.2 (Amiga, Inc. build 20040910)

Encountered when building Boost Spirit/Phoenix library test suite.

Comment 6 Giovanni Bajo 2005-01-20 03:08:01 UTC

Testing a patch

Comment 9 Giovanni Bajo 2005-01-21 02:29:13 UTC

Fixed in 4.0, the patch needs a little bit of tweaking for 3.4.

Comment 10 Paolo Bonzini 2005-01-24 08:29:59 UTC

Removing 4.0.0 from known-to-fail list.

Comment 13 Giovanni Bajo 2005-07-25 21:13:56 UTC

Fixed in GCC 3.4.5 too.