[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-12-08 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-08 
08:48 ---
Subject: Bug 18672

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2004-12-08 08:48:01

Modified files:
gcc: ChangeLog gimplify.c 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/g++.dg/opt: array1.C 

Log message:
.:
PR c++/18672
* gimplify.c (canonicalize_addr_expr): Cope with array of
incomplete type.
(gimplify_conversion): Remove redundant checks.
testsuite:
PR c++/18672
* g++.dg/opt/array1.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6747&r2=2.6748
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.91&r2=2.92
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4722&r2=1.4723
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/array1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-12-08 Thread nathan at gcc dot gnu dot org

--- Additional Comments From nathan at gcc dot gnu dot org  2004-12-08 
08:45 ---
PR c++/18672
* gimplify.c (canonicalize_addr_expr): Cope with array of
incomplete type.
(gimplify_conversion): Remove redundant checks.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-12-04 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-05 
02:58 ---
Patch here: .

-- 
   What|Removed |Added

   Keywords||patch


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-11-30 Thread reichelt at gcc dot gnu dot org

--- Additional Comments From reichelt at gcc dot gnu dot org  2004-11-30 
13:50 ---
More compact testcase:

==
template struct A {};

struct B
{
static A<0> a[1];
A<0>* foo() { return a; }
};
==


-- 
   What|Removed |Added

 CC||reichelt at gcc dot gnu dot
   ||org
   Keywords||monitored


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-11-29 Thread nathan at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-11-25 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-25 
15:08 ---
The class/template A<1> is not being layouted.

-- 
   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-11-25 Thread giovannibajo at libero dot it


-- 
   What|Removed |Added

   Severity|normal  |critical
   Keywords||ice-on-valid-code
  Known to fail||4.0.0
  Known to work||3.4.2


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-11-25 Thread giovannibajo at libero dot it

--- Additional Comments From giovannibajo at libero dot it  2004-11-25 
13:47 ---
Program received signal SIGSEGV, Segmentation fault.
0x081c56d9 in gimplify_expr (expr_p=0xf6f81884, pre_p=0xfef06504,
post_p=0xfef06430, gimple_test_f=0x81bfc50 ,
fallback=fb_rvalue) at ../../gcc/gcc/gimplify.c:1377
1377  if (TREE_CODE (TYPE_SIZE_UNIT (dctype)) != INTEGER_CST



Backtrace:

#0  0x081c56d9 in gimplify_expr (expr_p=0xf6f81884, pre_p=0xfef06504,
post_p=0xfef06430, gimple_test_f=0x81bfc50 ,
fallback=fb_rvalue) at ../../gcc/gcc/gimplify.c:1377
#1  0x081c80e3 in gimplify_arg (expr_p=0xf6f81884, pre_p=0xfef06504)
at ../../gcc/gcc/gimplify.c:1740
#2  0x081c4795 in gimplify_expr (expr_p=0xfef06598, pre_p=0xfef06504,
post_p=0xfef06500, gimple_test_f=0x81bf9d0 ,
fallback=fb_none) at ../../gcc/gcc/gimplify.c:1806
#3  0x081c8f2a in gimplify_stmt (stmt_p=0x0) at ../../gcc/gcc/gimplify.c:3445
#4  0x081c97b7 in gimplify_to_stmt_list (stmt_p=0xfef06598)
at ../../gcc/gcc/gimplify.c:3453
#5  0x081c370e in gimplify_cleanup_point_expr (expr_p=0xf6ef0ef0,
pre_p=0xfef06634) at ../../gcc/gcc/gimplify.c:3266
#6  0x081c4455 in gimplify_expr (expr_p=0xf6ef0ef0, pre_p=0xfef06634,
post_p=0xfef06630, gimple_test_f=0x81bf9d0 ,
fallback=fb_none) at ../../gcc/gcc/gimplify.c:3799
#7  0x081c8f2a in gimplify_stmt (stmt_p=0x0) at ../../gcc/gcc/gimplify.c:3445
#8  0x081c44d1 in gimplify_expr (expr_p=0xf6f7e110, pre_p=0xfef066f4,
post_p=0xfef066f0, gimple_test_f=0x81bf9d0 ,
fallback=fb_none) at ../../gcc/gcc/gimplify.c:2978
#9  0x081c8f2a in gimplify_stmt (stmt_p=0x0) at ../../gcc/gcc/gimplify.c:3445
#10 0x081c97b7 in gimplify_to_stmt_list (stmt_p=0xf6f7e110)
at ../../gcc/gcc/gimplify.c:3453
#11 0x081c98de in gimplify_bind_expr (expr_p=0xf6f7e138, temp=Variable "temp" 
is not available.
)
at ../../gcc/gcc/gimplify.c:864
#12 0x081c47b1 in gimplify_expr (expr_p=0xf6f7e138, pre_p=0xfef06824,
post_p=0xfef06820, gimple_test_f=0x81bf9d0 ,
fallback=fb_none) at ../../gcc/gcc/gimplify.c:3695
#13 0x081c8f2a in gimplify_stmt (stmt_p=0x0) at ../../gcc/gcc/gimplify.c:3445
#14 0x081c97b7 in gimplify_to_stmt_list (stmt_p=0xf6f7e138)
at ../../gcc/gcc/gimplify.c:3453
#15 0x081c98de in gimplify_bind_expr (expr_p=0xf6f80144, temp=Variable "temp" 
is not available.
)
at ../../gcc/gcc/gimplify.c:864
#16 0x081c47b1 in gimplify_expr (expr_p=0xf6f80144, pre_p=0xfef06954,
post_p=0xfef06950, gimple_test_f=0x81bf9d0 ,
fallback=fb_none) at ../../gcc/gcc/gimplify.c:3695
#17 0x081c8f2a in gimplify_stmt (stmt_p=0x0) at ../../gcc/gcc/gimplify.c:3445
#18 0x081c8f9d in gimplify_body (body_p=0xf6f80144, fndecl=0xf6f800e8)
at ../../gcc/gcc/gimplify.c:4266
#19 0x081c91ff in gimplify_function_tree (fndecl=0xf6f800e8)
at ../../gcc/gcc/gimplify.c:4313
#20 0x08193cfc in c_genericize (fndecl=0xf6f800e8)
at ../../gcc/gcc/c-gimplify.c:136
#21 0x08074a27 in finish_function (flags=2) at ../../gcc/gcc/cp/decl.c:10677
#22 0x080ed418 in cp_parser_function_definition_after_declarator (
parser=0xf6f7fac4, inline_p=1 '\001') at ../../gcc/gcc/cp/parser.c:14692
#23 0x080ed6c6 in cp_parser_late_parsing_for_member (parser=0xf6f7fac4,
member_function=0xf6f800e8) at ../../gcc/gcc/cp/parser.c:15124
#24 0x080ee370 in cp_parser_type_specifier (parser=0xf6f7fac4, 
flags=Variable "flags" is not available.
)
at ../../gcc/gcc/cp/parser.c:12376
#25 0x080ef1b2 in cp_parser_decl_specifier_seq (parser=0xf6f7fac4,
flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0xfef06bd8,
declares_class_or_enum=0xfef06c24) at ../../gcc/gcc/cp/parser.c:7152
#26 0x080f9962 in cp_parser_simple_declaration (parser=0xf6f7fac4,
function_definition_allowed_p=1 '\001') at ../../gcc/gcc/cp/parser.c:6847
#27 0x080eb74a in cp_parser_block_declaration (parser=0xf6f7fac4,
statement_p=0 '\0') at ../../gcc/gcc/cp/parser.c:6808
#28 0x080fbb94 in cp_parser_declaration (parser=0xf6f7fac4)
at ../../gcc/gcc/cp/parser.c:6725
#29 0x080fc025 in cp_parser_declaration_seq_opt (parser=0xf6f7fac4)
at ../../gcc/gcc/cp/parser.c:6629
#30 0x080fc368 in c_parse_file () at ../../gcc/gcc/cp/parser.c:2555
#31 0x0818fb85 in c_common_parse_file (set_yydebug=0)
at ../../gcc/gcc/c-opts.c:1095
#32 0x0848c5b5 in toplev_main (argc=0, argv=0xfef06e04)
at ../../gcc/gcc/toplev.c:985
#33 0x00bf3e33 in __libc_start_main () from /lib/tls/libc.so.6
#34 0x08049bd1 in _start ()


-- 


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


[Bug c++/18672] [4.0 Regression] Segfault with simple template code

2004-11-25 Thread giovannibajo at libero dot it

--- Additional Comments From giovannibajo at libero dot it  2004-11-25 
13:44 ---
Confirmed.

: Search converges between 2004-06-20-trunk (#469) and 2004-06-22-trunk (#470).


-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2004-11-25 13:44:09
   date||
Summary|[Regresion, ICE-on-legal]   |[4.0 Regression] Segfault
   |Template failure|with simple template code
   Target Milestone|--- |4.0.0


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