stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-424) [gcc 3.3.3] warning: inlining failed in call to std::valarray copy ctor
Date Tue, 25 Mar 2008 16:33:26 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582008#action_12582008
] 

Martin Sebor commented on STDCXX-424:
-------------------------------------

gcc 4.1 does a much better job of inlining the functions, although it still calls, perhaps
unavoidably, {{operator delete()}}:

{noformat}
	.file	"t.cpp"
	.text
	.align 2
	.p2align 4,,15
.globl main
	.type	main, @function
main:
	subq	$8, %rsp
	xorl	%edi, %edi
	call	operator delete(void*)
	xorl	%edi, %edi
	call	operator delete(void*)
	xorl	%eax, %eax
	addq	$8, %rsp
	ret
	.size	main, .-main

	.ident	"GCC: (GNU) 4.1.2 20070925 (Red Hat 4.1.2-33)"
	.section	.note.GNU-stack,"",@progbits
{noformat}

> [gcc 3.3.3] warning: inlining failed in call to std::valarray copy ctor
> -----------------------------------------------------------------------
>
>                 Key: STDCXX-424
>                 URL: https://issues.apache.org/jira/browse/STDCXX-424
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 26. Numerics
>    Affects Versions: 4.1.3, 4.1.4
>         Environment: gcc 3.3.3 on Linux
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>            Priority: Minor
>             Fix For: 4.2.1
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> We're getting lots of warnings like the ones below from valarray tests. Even four levels
of inlining in user code (not at all uncommon) triggers the noise...
> $ cat t.cpp && make t
> #include <valarray>
> inline void f0 (std::valarray<int>) { }
> inline void f1 (std::valarray<int> va) { f0 (va); }
> inline void f2 (std::valarray<int> va) { f1 (va); }
> inline void f3 (std::valarray<int> va) { f2 (va); }
> inline void f4 (std::valarray<int> va) { f3 (va); }
> int main ()
> {
>     f4 (std::valarray<int>());
> }
> gcc -c -I/amd/devco/sebor/stdcxx/include/ansi   -pthread -I/amd/devco/sebor/stdcxx/include
-I/build/sebor/stdcxx-gcc-3.3.3_43.41-12d/include -I/amd/devco/sebor/stdcxx/examples/include
 -pedantic -nostdinc++ -O2  -m32 -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
-Wcast-align   t.cpp
> gcc t.o -o t -pthread -m32 -L/build/sebor/stdcxx-gcc-3.3.3_43.41-12d/lib  -Wl,-R/build/sebor/stdcxx-gcc-3.3.3_43.41-12d/lib
-lstd12d -lsupc++ -lm 
> In file included from /amd/devco/sebor/stdcxx/include/rw/_array.h:7:
> t.cpp: In function `int main()':
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:6: warning: called from here
> In file included from /amd/devco/sebor/stdcxx/include/rw/_array.h:6:
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:5: warning: called from here
> In file included from /amd/devco/sebor/stdcxx/include/rw/_array.h:5:
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:4: warning: called from here
> In file included from /amd/devco/sebor/stdcxx/include/rw/_array.h:4:
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:3: warning: called from here
> In file included from t.cpp:7,
>                  from t.cpp:11:
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:6: warning: called from here
> In file included from t.cpp:6,
>                  from t.cpp:7,
>                  from t.cpp:11:
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:5: warning: called from here
> In file included from t.cpp:5,
>                  from t.cpp:6,
>                  from t.cpp:7,
>                  from t.cpp:11:
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:4: warning: called from here
> In file included from t.cpp:4,
>                  from t.cpp:5,
>                  from t.cpp:6,
>                  from t.cpp:7,
>                  from t.cpp:11:
> /amd/devco/sebor/stdcxx/include/valarray:93: warning: inlining failed in call 
>    to `std::valarray<_TypeT>::valarray(const std::valarray<_TypeT>&)
[with 
>    _TypeT = int]'
> t.cpp:3: warning: called from here

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message