public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/45074]  New: GCC Segmentation fault - negating global register variables
@ 2010-07-26  8:12 steffenschmidt dot ext at siemens dot com
  2010-07-26  8:15 ` [Bug c++/45074] " steffenschmidt dot ext at siemens dot com
  0 siblings, 1 reply; 2+ messages in thread
From: steffenschmidt dot ext at siemens dot com @ 2010-07-26  8:12 UTC (permalink / raw)
  To: gcc-bugs

When compiling the following example using language c++ (compiling in language
c works fine) and optimization level -O1 or higher (-O0 works fine) GCC 4.4.1
for MIPS crashes with an internal compiler error - segmentation fault in line
5.

Please note that the register variable is declared "double", when using "float"
type the error does not occur.

gcc -O1 -x c++ test_neg_float_register.c

---------test_neg_float_register.c----------
register double g_param_f64_1 __asm__("$f20");

void negate_float_register (void)
{
  g_param_f64_1 = -(g_param_f64_1);
}
--------------------------------------------

See attachment for example file.

The error is reproducible with GCC version 4.3.2 and 4.4.1 and optimization
level higher -O0 (that is -O1, -O2, -O3).


-- 
           Summary: GCC Segmentation fault - negating global register
                    variables
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steffenschmidt dot ext at siemens dot com
  GCC host triplet: MinGW
GCC target triplet: mips*-*


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


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

* [Bug c++/45074] GCC Segmentation fault - negating global register variables
  2010-07-26  8:12 [Bug c++/45074] New: GCC Segmentation fault - negating global register variables steffenschmidt dot ext at siemens dot com
@ 2010-07-26  8:15 ` steffenschmidt dot ext at siemens dot com
  0 siblings, 0 replies; 2+ messages in thread
From: steffenschmidt dot ext at siemens dot com @ 2010-07-26  8:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from steffenschmidt dot ext at siemens dot com  2010-07-26 08:14 -------
Created an attachment (id=21311)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21311&action=view)
Test file to reproduce the segmentation fault.


-- 


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


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

end of thread, other threads:[~2010-07-26  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-26  8:12 [Bug c++/45074] New: GCC Segmentation fault - negating global register variables steffenschmidt dot ext at siemens dot com
2010-07-26  8:15 ` [Bug c++/45074] " steffenschmidt dot ext at siemens dot com

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).