public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
@ 2004-04-24 18:55 wanderer at rsu dot ru
  2004-04-24 19:40 ` [Bug c++/15119] " wanderer at rsu dot ru
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: wanderer at rsu dot ru @ 2004-04-24 18:55 UTC (permalink / raw)
  To: gcc-bugs

Current mainline CVS g++ ICE at testcase with error:
---8X---------------------------
make, ~/work/cpp/Test > g++ test.cc -save-temps
test.cc: In function `int main()':
test.cc:16: internal compiler error: in substitute_placeholder_in_expr, at 
tree.c:2155
Please submit a full bug report,
---X8---------------------------
testcase:
---8X---------------------------
#include <cstdio>
#include <string>

char const* descs[] = { 
     "Test0: %s.", 
     "Test1: %s.", 
     "Test2: %s.", 
     "Test3: %s.", 
     "Test4: %s.", 
};

int main() {   
    int t = 1;
    char buf[100];
    std::string str = "String";
    sprintf( buf, descs[ std::min(t-1,4) ], str.c_str() ); 
    return 0;
}

---X8---------------------------

-- 
           Summary: internal compiler error: in
                    substitute_placeholder_in_expr, at tree.c:2155
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wanderer at rsu dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd5.1
  GCC host triplet: i386-unknown-freebsd5.1
GCC target triplet: i386-unknown-freebsd5.1


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
@ 2004-04-24 19:40 ` wanderer at rsu dot ru
  2004-04-24 20:45 ` wanderer at rsu dot ru
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: wanderer at rsu dot ru @ 2004-04-24 19:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wanderer at rsu dot ru  2004-04-24 18:54 -------
Created an attachment (id=6157)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6157&action=view)
*.cc file


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
  2004-04-24 19:40 ` [Bug c++/15119] " wanderer at rsu dot ru
@ 2004-04-24 20:45 ` wanderer at rsu dot ru
  2004-04-24 22:20 ` [Bug c++/15119] [3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: wanderer at rsu dot ru @ 2004-04-24 20:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wanderer at rsu dot ru  2004-04-24 18:55 -------
Created an attachment (id=6158)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6158&action=view)
*.ii file


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
  2004-04-24 19:40 ` [Bug c++/15119] " wanderer at rsu dot ru
  2004-04-24 20:45 ` wanderer at rsu dot ru
@ 2004-04-24 22:20 ` pinskia at gcc dot gnu dot org
  2004-04-25 13:59 ` bangerth at dealii dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-24 22:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-24 19:09 -------
Confirmed but not yet reduced.
I think this is caused by:
2004-03-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        * alias.c (get_alias_set): Remove handling of PLACEHOLDER_EXPR.
        * emit-rtl.c (component_ref_for_mem_expr): Likewise.
        (set_mem_attributes_minus_bitpos): Call SUBSTITUTE_PLACEHOLDER_IN_EXPR.
        * explow.c (expr_size): Likewise.
        * expr.h (placeholder_list, find_placeholder): Deleted.
        * expr.c (store_constructor): Likewise.
        (get_inner_reference): Likewise.  Also don't call find_placeholder.
        (placeholder_list, find_placeholder): Deleted.
        (is_aligning_offset): Don't handle WITH_RECORD_EXPR, PLACEHOLDER_EXPR.
        (expand_expr_real, cases PLACEHOLDER_EXPR, WITH_RECORD_EXPR): Likewise.
        (highest_pow2_factor, case WITH_RECORD_EXPR): Remove.
        * dojump.c (do_jump, case WITH_RECORD_EXPR): Likewise.
        * dwarf2out.c (loc_descriptor_from_tree, case WITH_RECORD_EXPR):
        Likewise.
        * fold-const.c (invert_truthvalue, case WITH_RECORD_EXPR): Likewise.
        (extract_muldiv, case WITH_RECORD_EXPR): Likewise.
        * tree.c (expr_align, case WITH_RECORD_EXPR): Likewise.
        (contains_placeholder_p): Don't handle WITH_RECORD_EXPR.
        Clean up by using first_rtl_op.
        (substitute_in_expr): Use SUBSTITUTE_IN_EXPR for recursive call.
        (substitute_placeholder_in_expr): New function.
        * tree.def (WITH_RECORD_EXPR): Deleted.
        * tree.h (SUBSTITUTE_IN_EXPR, SUBSTITUTE_PLACEHOLDER_IN_EXPR): New.
        (substitute_placeholder_in_expr): New.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenner at gcc dot gnu dot
                   |                            |org
           Keywords|                            |ice-on-valid-code
            Summary|internal compiler error: in |[3.5 Regression] internal
                   |substitute_placeholder_in_ex|compiler error: in
                   |pr, at tree.c:2155          |substitute_placeholder_in_ex
                   |                            |pr, at tree.c:2155
   Target Milestone|---                         |3.5.0


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
                   ` (2 preceding siblings ...)
  2004-04-24 22:20 ` [Bug c++/15119] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-04-25 13:59 ` bangerth at dealii dot org
  2004-04-25 14:01 ` bangerth at dealii dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bangerth at dealii dot org @ 2004-04-25 13:59 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|i386-unknown-freebsd5.1     |
   GCC host triplet|i386-unknown-freebsd5.1     |
 GCC target triplet|i386-unknown-freebsd5.1     |
      Known to fail|                            |3.5.0
      Known to work|                            |3.4.0


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
                   ` (3 preceding siblings ...)
  2004-04-25 13:59 ` bangerth at dealii dot org
@ 2004-04-25 14:01 ` bangerth at dealii dot org
  2004-04-25 14:21 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bangerth at dealii dot org @ 2004-04-25 14:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-04-25 13:46 -------
This one was easy: 
----------------- 
template<typename T> 
const T& xmin(const T& a, const T& b); 
 
void bar (char *, ...); 
 
char const* descs[4]; 
 
int main() {    
    int t = 1; 
    char buf[100]; 
    bar( buf, descs[ xmin(t-1,4) ], 0 );  
    return 0; 
} 
------------------------ 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.cc 
g/x>  
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/gcc -c x.cc 
x.cc: In function `int main()': 
x.cc:11: internal compiler error: in substitute_placeholder_in_expr, at 
tree.c:2155 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-25 13:46:56
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
                   ` (4 preceding siblings ...)
  2004-04-25 14:01 ` bangerth at dealii dot org
@ 2004-04-25 14:21 ` pinskia at gcc dot gnu dot org
  2004-04-25 15:31 ` kenner at vlsi1 dot ultra dot nyu dot edu
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-25 14:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-25 13:52 -------
Here is the back-trace, it works just fine on the tree-ssa also:
#0  0x4202bb8a in exit () from /lib/i686/libc.so.6
#1  0x081c0364 in diagnostic_report_diagnostic (context=0x8538cc0, diagnostic=0xbffeae40)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/diagnostic.c:281
#2  0x081c0413 in internal_error (msgid=0x83 <Address 0x83 out of bounds>)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/diagnostic.c:537
#3  0x081c044f in fancy_abort (file=0x83 <Address 0x83 out of bounds>, line=1108532352,
    function=0x83 <Address 0x83 out of bounds>) at /home/gates/pinskia/src/gnu/gcc/src/gcc/
diagnostic.c:583
#4  0x083ccd63 in substitute_placeholder_in_expr (exp=0x4004c260, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2160
#5  0x083cd41b in substitute_placeholder_in_expr (exp=0x4012c280, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2128
#6  0x083cd41b in substitute_placeholder_in_expr (exp=0x4012c294, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2128
#7  0x083cd41b in substitute_placeholder_in_expr (exp=0x4012c2a8, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2128
#8  0x083cce68 in substitute_placeholder_in_expr (exp=0x4012c2bc, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2101
#9  0x083ccde2 in substitute_placeholder_in_expr (exp=0x4012c26c, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2100
#10 0x083cd54b in substitute_placeholder_in_expr (exp=0x4005d150, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2136
#11 0x083cd41b in substitute_placeholder_in_expr (exp=0x4012c30c, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2128
#12 0x083cd41b in substitute_placeholder_in_expr (exp=0x4012c320, obj=0x4005d168)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree.c:2128
#13 0x081fb7d5 in get_inner_reference (exp=0x4005d168, pbitsize=0xbffeb2f4, pbitpos=0xbffeb2f8, 
poffset=0xbffeb2fc,
    pmode=0x83, punsignedp=0xbffeb30c, pvolatilep=0xbffeb304) at /home/gates/pinskia/src/gnu/
gcc/src/gcc/expr.c:5514
#14 0x081fe090 in expand_expr_real (exp=0x4005d168, target=0x0, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/expr.c:6954
#15 0x081a3c21 in expand_call (exp=0x4005d180, target=0x0, ignore=1) at /home/gates/pinskia/
src/gnu/gcc/src/gcc/calls.c:1381
#16 0x08201589 in expand_expr_real (exp=0x4005d180, target=0x0, tmode=VOIDmode, 
modifier=EXPAND_NORMAL, alt_rtl=0xbffeb898)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/expr.c:7417
#17 0x083aac69 in expand_expr_stmt_value (exp=0x4005d180, want_value=0, maybe_last=0)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/stmt.c:2165
#18 0x08173404 in genrtl_expr_stmt_value (expr=0x4005d180, want_value=0, maybe_last=0)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/c-semantics.c:355
#19 0x08174cac in expand_stmt (t=0x4012c3fc) at /home/gates/pinskia/src/gnu/gcc/src/gcc/c-
semantics.c:801
#20 0x081752eb in genrtl_compound_stmt (t=0x400d8f50) at /home/gates/pinskia/src/gnu/gcc/src/
gcc/c-semantics.c:721
#21 0x08174cb9 in expand_stmt (t=0x400d8f50) at /home/gates/pinskia/src/gnu/gcc/src/gcc/c-
semantics.c:828
#22 0x081752eb in genrtl_compound_stmt (t=0x400d8f14) at /home/gates/pinskia/src/gnu/gcc/src/
gcc/c-semantics.c:721
#23 0x08174cb9 in expand_stmt (t=0x400d8f14) at /home/gates/pinskia/src/gnu/gcc/src/gcc/c-
semantics.c:828
#24 0x0840fc07 in tree_rest_of_compilation (fndecl=0x40129f30, nested_p=false)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/tree-optimize.c:178
#25 0x0812d17e in expand_body (fn=0x40129f30) at /home/gates/pinskia/src/gnu/gcc/src/gcc/cp/
semantics.c:2928
#26 0x084120fe in cgraph_expand_function (node=0x4012ba8c) at /home/gates/pinskia/src/gnu/
gcc/src/gcc/cgraphunit.c:791
#27 0x08412225 in cgraph_assemble_pending_functions () at /home/gates/pinskia/src/gnu/gcc/src/
gcc/cgraphunit.c:287
#28 0x08412f85 in cgraph_finalize_function (decl=0x40129f30, nested=false)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/cgraphunit.c:368
#29 0x0812d4b3 in expand_or_defer_fn (fn=0x40129f30) at /home/gates/pinskia/src/gnu/gcc/src/
gcc/cp/semantics.c:3011
#30 0x080f14ad in cp_parser_function_definition_after_declarator (parser=0x4012ac00, 
inline_p=false)
    at /home/gates/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:14307
#31 0x080f189a in cp_parser_init_declarator (parser=0x4012ac00, decl_specifiers=0x400d8eb0, 
prefix_attributes=0x0,

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|3.4.0                       |3.4.0 tree-ssa


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
                   ` (5 preceding siblings ...)
  2004-04-25 14:21 ` pinskia at gcc dot gnu dot org
@ 2004-04-25 15:31 ` kenner at vlsi1 dot ultra dot nyu dot edu
  2004-04-26 13:08 ` cvs-commit at gcc dot gnu dot org
  2004-04-26 13:19 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: kenner at vlsi1 dot ultra dot nyu dot edu @ 2004-04-25 15:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kenner at vlsi1 dot ultra dot nyu dot edu  2004-04-25 14:38 -------
Subject: Re:   [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155

I have the fix for this but don't think I can check it in until later due
to network problems.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
                   ` (6 preceding siblings ...)
  2004-04-25 15:31 ` kenner at vlsi1 dot ultra dot nyu dot edu
@ 2004-04-26 13:08 ` cvs-commit at gcc dot gnu dot org
  2004-04-26 13:19 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-26 13:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-04-26 12:54 -------
Subject: Bug 15119

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2004-04-26 12:54:55

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/eh: cleanup3.C 
	gcc/testsuite/g++.dg/other: vararg-1.C 

Log message:
	2004-04-26  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR c++/15119
	* g++.dg/other/vararg-1.C: New test.
	
	PR c++/4794
	* g++.dg/eh/cleanup3.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3702&r2=1.3703
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/eh/cleanup3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/vararg-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/15119] [3.5 Regression] internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155
  2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
                   ` (7 preceding siblings ...)
  2004-04-26 13:08 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-26 13:19 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-26 13:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-26 12:57 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-04-26 12:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-24 18:55 [Bug c++/15119] New: internal compiler error: in substitute_placeholder_in_expr, at tree.c:2155 wanderer at rsu dot ru
2004-04-24 19:40 ` [Bug c++/15119] " wanderer at rsu dot ru
2004-04-24 20:45 ` wanderer at rsu dot ru
2004-04-24 22:20 ` [Bug c++/15119] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-04-25 13:59 ` bangerth at dealii dot org
2004-04-25 14:01 ` bangerth at dealii dot org
2004-04-25 14:21 ` pinskia at gcc dot gnu dot org
2004-04-25 15:31 ` kenner at vlsi1 dot ultra dot nyu dot edu
2004-04-26 13:08 ` cvs-commit at gcc dot gnu dot org
2004-04-26 13:19 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).