* [Bug tree-optimization/47714] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
@ 2011-02-13 0:56 ` jamborm at gcc dot gnu.org
2011-02-13 1:18 ` jamborm at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-02-13 0:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-02-13 00:54:24 UTC ---
Created attachment 23324
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23324
Testcase minimized with multidelta
Testcase minimized with multidelta, also fails at any optimization level
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
2011-02-13 0:56 ` [Bug tree-optimization/47714] " jamborm at gcc dot gnu.org
@ 2011-02-13 1:18 ` jamborm at gcc dot gnu.org
2011-02-13 10:12 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-02-13 1:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-02-13 00:59:04 UTC ---
Backtrace always leads to SSA verification:
(gdb) bt
#0 verify_gimple_call (stmt=0x7ffff6970aa0) at
/home/mjambor/gcc/trunk/src/gcc/tree-cfg.c:3137
#1 0x000000000095bcc7 in verify_stmts () at
/home/mjambor/gcc/trunk/src/gcc/tree-cfg.c:4385
#2 0x0000000000a78fae in verify_ssa (check_modified_stmt=1 '\001')
at /home/mjambor/gcc/trunk/src/gcc/tree-ssa.c:878
#3 0x000000000089c776 in execute_function_todo (data=<value optimized out>)
at /home/mjambor/gcc/trunk/src/gcc/passes.c:1245
#4 0x000000000089c508 in execute_todo (flags=4294956000) at
/home/mjambor/gcc/trunk/src/gcc/passes.c:1276
#5 0x000000000089d60a in execute_one_pass (pass=0x139a180) at
/home/mjambor/gcc/trunk/src/gcc/passes.c:1584
#6 0x000000000089d885 in execute_pass_list (pass=0x139a180) at
/home/mjambor/gcc/trunk/src/gcc/passes.c:1616
#7 0x000000000089d897 in execute_pass_list (pass=0x139b940) at
/home/mjambor/gcc/trunk/src/gcc/passes.c:1617
#8 0x000000000099ff56 in tree_rest_of_compilation (fndecl=0x7ffff5fb2100)
At -O2 the pass that is being verified is strip_predict_hints, at -O2
it is cplxlower0. In both cases the verified function looks like
this:
(gdb) call debug_function (current_function_decl, 0)
const google_breakpad::MinidumpModule*
google_breakpad::MinidumpModuleList::_ZTch0_h8_NK15google_breakpad18MinidumpModuleList19GetModuleForAddressEm(u_int64_t)
const (const struct MinidumpModuleList * const this, u_int64_t address)
{
const struct MinidumpModule * adjusted_this.2;
<bb 2>:
retval.1_3 = *.LTHUNK0 (this_2(D), address);
if (retval.1_3 != 0B)
goto <bb 3> (<L0>);
else
goto <bb 5>;
<bb 5>:
adjusted_this.2_4 = 0B;
goto <bb 4>;
<L0>:
adjusted_this.2_5 = retval.1_3 + 8;
<bb 4>:
# adjusted_this.2_1 = PHI <adjusted_this.2_5(3), adjusted_this.2_4(5)>
return adjusted_this.2_1;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
2011-02-13 0:56 ` [Bug tree-optimization/47714] " jamborm at gcc dot gnu.org
2011-02-13 1:18 ` jamborm at gcc dot gnu.org
@ 2011-02-13 10:12 ` rguenth at gcc dot gnu.org
2011-03-02 15:16 ` jamborm at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-13 10:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-13 10:11:39 UTC ---
It looks like some SSA rewriting is missing for the parameter.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (2 preceding siblings ...)
2011-02-13 10:12 ` rguenth at gcc dot gnu.org
@ 2011-03-02 15:16 ` jamborm at gcc dot gnu.org
2011-03-08 16:57 ` [Bug tree-optimization/47714] [4.6 Regression] " rguenth at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-03-02 15:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.03.02 15:16:29
AssignedTo|unassigned at gcc dot |jamborm at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-03-02 15:16:29 UTC ---
Mine. It's not being marked for renaming in assemble_thunk for some reason.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (3 preceding siblings ...)
2011-03-02 15:16 ` jamborm at gcc dot gnu.org
@ 2011-03-08 16:57 ` rguenth at gcc dot gnu.org
2011-03-08 17:07 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-08 16:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code,
| |wrong-code
Priority|P3 |P1
Known to work| |4.5.2
Target Milestone|--- |4.6.0
Summary|verify_ssa fails with |[4.6 Regression] verify_ssa
|error: invalid argument to |fails with error: invalid
|gimple call |argument to gimple call
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-08 16:56:54 UTC ---
Fails at -O0.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (4 preceding siblings ...)
2011-03-08 16:57 ` [Bug tree-optimization/47714] [4.6 Regression] " rguenth at gcc dot gnu.org
@ 2011-03-08 17:07 ` rguenth at gcc dot gnu.org
2011-03-08 20:42 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-08 17:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-08 17:07:01 UTC ---
More reduced testcase:
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
class CodeModule {
public:
virtual ~CodeModule() { }
};
class CodeModules {
virtual const CodeModule* GetModuleForAddress(u_int64_t address) const = 0;
};
template<typename AddressType, typename EntryType> class RangeMap
{
public:
RangeMap() ;
bool RetrieveRange(const AddressType &address, EntryType *entry) const;
};
class MinidumpObject {
public:
virtual ~MinidumpObject() { }
};
class MinidumpModule : public MinidumpObject, public CodeModule { };
class MinidumpModuleList : public CodeModules {
virtual const MinidumpModule* GetModuleForAddress(u_int64_t address) const;
RangeMap<u_int64_t, unsigned int> *range_map_;
};
const MinidumpModule*
MinidumpModuleList::GetModuleForAddress(u_int64_t address) const
{
unsigned int module_index;
range_map_->RetrieveRange(address, &module_index);
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (5 preceding siblings ...)
2011-03-08 17:07 ` rguenth at gcc dot gnu.org
@ 2011-03-08 20:42 ` jakub at gcc dot gnu.org
2011-03-08 20:46 ` jamborm at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-08 20:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-08 20:42:17 UTC ---
Even more reduced testcase:
struct A { virtual ~A () {} };
struct B { virtual ~B () {} };
struct C { virtual const A *foo (int) const = 0; };
struct E : public B, public A { };
struct F : public C
{
virtual const E *foo (int) const;
};
void bar (int &);
const E *
F::foo (int x) const
{
bar (x);
return __null;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (6 preceding siblings ...)
2011-03-08 20:42 ` jakub at gcc dot gnu.org
@ 2011-03-08 20:46 ` jamborm at gcc dot gnu.org
2011-03-09 8:43 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-03-08 20:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #8 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-03-08 20:46:42 UTC ---
Created attachment 23584
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23584
proposed patch
I'm currently bootstrapping and testing this patch.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (7 preceding siblings ...)
2011-03-08 20:46 ` jamborm at gcc dot gnu.org
@ 2011-03-09 8:43 ` jakub at gcc dot gnu.org
2011-03-09 12:02 ` jamborm at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-09 8:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-09 08:43:32 UTC ---
BTW, if you adjust the testcase (at least not to use explicit DImode type), I'd
say this patch is obvious, thunks never take addresses of its parameters and
whether the original method takes those addresses is irrelevant to thunks.
You could certainly handle TREE_ADDRESSABLE in assemble_thunk by copying siuch
arguments into a temporary, but that would be good just to shut up
verification.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (8 preceding siblings ...)
2011-03-09 8:43 ` jakub at gcc dot gnu.org
@ 2011-03-09 12:02 ` jamborm at gcc dot gnu.org
2011-03-09 17:00 ` jamborm at gcc dot gnu.org
2011-03-09 17:02 ` jamborm at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-03-09 12:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #10 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-03-09 12:02:34 UTC ---
I have posted the patch (with the simpler testcase, thanks) to the
mailing list:
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00461.html
If there are no objections, I'll commit it in a few hours.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (9 preceding siblings ...)
2011-03-09 12:02 ` jamborm at gcc dot gnu.org
@ 2011-03-09 17:00 ` jamborm at gcc dot gnu.org
2011-03-09 17:02 ` jamborm at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-03-09 17:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
--- Comment #11 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-03-09 16:59:59 UTC ---
Author: jamborm
Date: Wed Mar 9 16:59:55 2011
New Revision: 170822
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170822
Log:
2011-03-09 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/47714
* cp/method.c (use_thunk): Clear addressable flag of thunk arguments.
* testsuite/g++.dg/torture/pr47714.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr47714.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/method.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/47714] [4.6 Regression] verify_ssa fails with error: invalid argument to gimple call
2011-02-13 0:54 [Bug tree-optimization/47714] New: verify_ssa fails with error: invalid argument to gimple call jamborm at gcc dot gnu.org
` (10 preceding siblings ...)
2011-03-09 17:00 ` jamborm at gcc dot gnu.org
@ 2011-03-09 17:02 ` jamborm at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-03-09 17:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47714
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #12 from Martin Jambor <jamborm at gcc dot gnu.org> 2011-03-09 17:02:23 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread