public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/39623] New: Optimizer changes return from htons(uint16) @ 2009-04-03 8:57 strk at keybit dot net 2009-04-03 9:02 ` [Bug c++/39623] " strk at keybit dot net ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: strk at keybit dot net @ 2009-04-03 8:57 UTC (permalink / raw) To: gcc-bugs The bug is known to occur with the following versions: - gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) - g++ (Ubuntu 4.3.2-2ubuntu11) 4.3.3 20090111 (prerelease) The symptom of the bug is that when you use -O2 htons(short) returns 'unsigned int' (32 bit) rather then the expected 16bit value. With no optimization it returns the correct 16bit. I'll attach a testcase. -- Summary: Optimizer changes return from htons(uint16) Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: strk at keybit dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39623 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/39623] Optimizer changes return from htons(uint16) 2009-04-03 8:57 [Bug c++/39623] New: Optimizer changes return from htons(uint16) strk at keybit dot net @ 2009-04-03 9:02 ` strk at keybit dot net 2009-04-03 9:23 ` schwab at linux-m68k dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: strk at keybit dot net @ 2009-04-03 9:02 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from strk at keybit dot net 2009-04-03 09:01 ------- Created an attachment (id=17581) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17581&action=view) Testcase for optimizer bug -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39623 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/39623] Optimizer changes return from htons(uint16) 2009-04-03 8:57 [Bug c++/39623] New: Optimizer changes return from htons(uint16) strk at keybit dot net 2009-04-03 9:02 ` [Bug c++/39623] " strk at keybit dot net @ 2009-04-03 9:23 ` schwab at linux-m68k dot org 2009-04-03 9:27 ` strk at keybit dot net ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: schwab at linux-m68k dot org @ 2009-04-03 9:23 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from schwab at linux-m68k dot org 2009-04-03 09:22 ------- <arpa/inet.h> probably defines different versions of htons depending on optimisation level. -- schwab at linux-m68k dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39623 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/39623] Optimizer changes return from htons(uint16) 2009-04-03 8:57 [Bug c++/39623] New: Optimizer changes return from htons(uint16) strk at keybit dot net 2009-04-03 9:02 ` [Bug c++/39623] " strk at keybit dot net 2009-04-03 9:23 ` schwab at linux-m68k dot org @ 2009-04-03 9:27 ` strk at keybit dot net 2009-04-22 15:53 ` sje at gcc dot gnu dot org 2009-04-23 15:37 ` sje at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: strk at keybit dot net @ 2009-04-03 9:27 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from strk at keybit dot net 2009-04-03 09:27 ------- You mean I should file a bug against libc ? Or that it's a non-bug ? The htons() manual page states it'd return a short... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39623 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/39623] Optimizer changes return from htons(uint16) 2009-04-03 8:57 [Bug c++/39623] New: Optimizer changes return from htons(uint16) strk at keybit dot net ` (2 preceding siblings ...) 2009-04-03 9:27 ` strk at keybit dot net @ 2009-04-22 15:53 ` sje at gcc dot gnu dot org 2009-04-23 15:37 ` sje at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: sje at gcc dot gnu dot org @ 2009-04-22 15:53 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from sje at gcc dot gnu dot org 2009-04-22 15:53 ------- Subject: Bug 39623 Author: sje Date: Wed Apr 22 15:53:05 2009 New Revision: 146593 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146593 Log: PR testsuite/39623 * gcc.dg/vect/no-vfa-vect-43.c Fix vect_no_align check. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39623 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/39623] Optimizer changes return from htons(uint16) 2009-04-03 8:57 [Bug c++/39623] New: Optimizer changes return from htons(uint16) strk at keybit dot net ` (3 preceding siblings ...) 2009-04-22 15:53 ` sje at gcc dot gnu dot org @ 2009-04-23 15:37 ` sje at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: sje at gcc dot gnu dot org @ 2009-04-23 15:37 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from sje at gcc dot gnu dot org 2009-04-23 15:37 ------- Subject: Bug 39623 Author: sje Date: Thu Apr 23 15:36:48 2009 New Revision: 146650 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146650 Log: PR testsuite/39623 * gcc.dg/vect/no-vfa-vect-57.c: XFAIL when vect_no_align. * gcc.dg/vect/no-vfa-vect-61.c: Ditto. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c trunk/gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39623 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-23 15:37 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-04-03 8:57 [Bug c++/39623] New: Optimizer changes return from htons(uint16) strk at keybit dot net 2009-04-03 9:02 ` [Bug c++/39623] " strk at keybit dot net 2009-04-03 9:23 ` schwab at linux-m68k dot org 2009-04-03 9:27 ` strk at keybit dot net 2009-04-22 15:53 ` sje at gcc dot gnu dot org 2009-04-23 15:37 ` sje 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).