public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/18925] New: Invalid gprel relocation in PIC
@ 2004-12-10 13:54 schwab at suse dot de
  2004-12-10 13:54 ` [Bug target/18925] " schwab at suse dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: schwab at suse dot de @ 2004-12-10 13:54 UTC (permalink / raw)
  To: gcc-bugs

$ cat gprel.cc 
class __attribute__ ((visibility("default"))) Type 
{ 
 private: 
  static long _staticTypeCount; 
 public: 
  Type() { _staticTypeCount++; } 
  ~Type(); 
}; 
 
long Type::_staticTypeCount = 0; 
 
Type::~Type() 
{ 
 _staticTypeCount--; 
} 
$ gcc -fPIC -fvisibility=hidden -S gprel.cc 
$ grep _staticTypeCount gprel.s 
	.global _ZN4Type16_staticTypeCountE# 
	.type	_ZN4Type16_staticTypeCountE#, @object 
	.size	_ZN4Type16_staticTypeCountE#, 8 
_ZN4Type16_staticTypeCountE: 
	addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp 
	addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp 
	addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp 
	addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp

-- 
           Summary: Invalid gprel relocation in PIC
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schwab at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-*-linux


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


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

* [Bug target/18925] Invalid gprel relocation in PIC
  2004-12-10 13:54 [Bug target/18925] New: Invalid gprel relocation in PIC schwab at suse dot de
@ 2004-12-10 13:54 ` schwab at suse dot de
  2004-12-10 13:55 ` schwab at suse dot de
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab at suse dot de @ 2004-12-10 13:54 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

* [Bug target/18925] Invalid gprel relocation in PIC
  2004-12-10 13:54 [Bug target/18925] New: Invalid gprel relocation in PIC schwab at suse dot de
  2004-12-10 13:54 ` [Bug target/18925] " schwab at suse dot de
@ 2004-12-10 13:55 ` schwab at suse dot de
  2004-12-10 15:11 ` [Bug target/18925] [4.0 regression] " schwab at suse dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab at suse dot de @ 2004-12-10 13:55 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code


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


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

* [Bug target/18925] [4.0 regression] Invalid gprel relocation in PIC
  2004-12-10 13:54 [Bug target/18925] New: Invalid gprel relocation in PIC schwab at suse dot de
  2004-12-10 13:54 ` [Bug target/18925] " schwab at suse dot de
  2004-12-10 13:55 ` schwab at suse dot de
@ 2004-12-10 15:11 ` schwab at suse dot de
  2004-12-10 16:23 ` schwab at suse dot de
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab at suse dot de @ 2004-12-10 15:11 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Invalid gprel relocation in |[4.0 regression] Invalid
                   |PIC                         |gprel relocation in PIC


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


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

* [Bug target/18925] [4.0 regression] Invalid gprel relocation in PIC
  2004-12-10 13:54 [Bug target/18925] New: Invalid gprel relocation in PIC schwab at suse dot de
                   ` (2 preceding siblings ...)
  2004-12-10 15:11 ` [Bug target/18925] [4.0 regression] " schwab at suse dot de
@ 2004-12-10 16:23 ` schwab at suse dot de
  2004-12-14  2:16 ` cvs-commit at gcc dot gnu dot org
  2004-12-14  2:18 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: schwab at suse dot de @ 2004-12-10 16:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schwab at suse dot de  2004-12-10 16:23 -------
Broken by 
 
2004-08-03  Mark Mitchell  <mark@codesourcery.com> 
 
	* class.c (build_vtable): Do not set DECL_VISIBILITY here. 
	(check_field_decls): Or here. 
	(check_methods): Or here. 
	(initialize_array): Don't mess with DECL_CONTEXT. 
	* cp-tree.h (start_decl): Adjust prototype. 
	(determine_visibility): New function. 
	* decl.c (duplicate_decls): Remove checks for hidden "operator 
	new". 
	(build_library_fn_1): Give all library functions default 
	visibility. 
	(start_decl): Add pop_scope_p parameter.  Tidy. 
	(cp_finish_decl): Do not pop scopes here.  Call 
	determine_visibility for variable definitions. 
	(start_preparsed_function): Call determine_visibility. 
	* decl2.c (determine_visibility): New function. 
	* method.c (use_thunk): Fix formatting. 
	* parser.c (cp_parser_condition): Adjust calls to start_decl. 
	(cp_parser_init_declarator): Likewise. 
	* pt.c (instantiate_decl): Always call pop_nested_class. 
	* rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY. 
	(tinfo_base_init): Likewise. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot com


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


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

* [Bug target/18925] [4.0 regression] Invalid gprel relocation in PIC
  2004-12-10 13:54 [Bug target/18925] New: Invalid gprel relocation in PIC schwab at suse dot de
                   ` (3 preceding siblings ...)
  2004-12-10 16:23 ` schwab at suse dot de
@ 2004-12-14  2:16 ` cvs-commit at gcc dot gnu dot org
  2004-12-14  2:18 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-14  2:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-14 02:16 -------
Subject: Bug 18925

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-12-14 02:15:56

Modified files:
	gcc/cp         : ChangeLog class.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/ext/visibility: staticdatamem.C 

Log message:
	PR c++/18925
	* class.c (layout_class_type): Determine the visibility of static
	data members.
	
	PR c++/18925
	* g++.dg/ext/visibility/staticdatamem.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4529&r2=1.4530
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.692&r2=1.693
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4746&r2=1.4747
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/visibility/staticdatamem.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug target/18925] [4.0 regression] Invalid gprel relocation in PIC
  2004-12-10 13:54 [Bug target/18925] New: Invalid gprel relocation in PIC schwab at suse dot de
                   ` (4 preceding siblings ...)
  2004-12-14  2:16 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-14  2:18 ` mmitchel at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-14  2:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-12-14 02:18 -------
Fixed in GCC 4.0.

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


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


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

end of thread, other threads:[~2004-12-14  2:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-10 13:54 [Bug target/18925] New: Invalid gprel relocation in PIC schwab at suse dot de
2004-12-10 13:54 ` [Bug target/18925] " schwab at suse dot de
2004-12-10 13:55 ` schwab at suse dot de
2004-12-10 15:11 ` [Bug target/18925] [4.0 regression] " schwab at suse dot de
2004-12-10 16:23 ` schwab at suse dot de
2004-12-14  2:16 ` cvs-commit at gcc dot gnu dot org
2004-12-14  2:18 ` mmitchel 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).