(Reuters) - A South Carolina bill to require transgender people to use public restrooms matching their sex at birth was slammed by critics on Wednesday, and former Beatles drummer Ringo Starr said he would cancel a performance in North Carolina where a similar law has been passed.

A gender-neutral bathroom is seen at the University of California, Irvine in Irvine, California, in this file photo taken September 30, 2014. REUTERS/Lucy Nicholson

“We need to take a stand against this hatred,” Starr said in a statement. “Spread peace and love.” He said he was canceling a June performance in Cary, North Carolina, to protest that state’s law. Rocker Bruce Springsteen has also scrapped a concert in the state.

So-called “bathroom bills” have fueled debate about privacy, religious freedom and equal rights and drawn stern reactions from major corporations and entertainers who call them discriminatory.

Most of the speakers at a subcommittee hearing in Columbia, South Carolina, on Wednesday said the bathroom measure proposed there defied logic.

“This bill is an undisguised attack on some of our most talented and most vulnerable citizens,” Columbia Mayor Steve Benjamin said, adding it would cause irreparable economic damage.

Supporters said opening restrooms and locker rooms to the opposite gender in schools would violate students’ right to privacy.

Republican Senator Lee Bright, who sponsored the measure, said he feared adult men would use more lenient bathroom policies as an excuse to prey on women and children.

“I don’t believe that transgender people are pedophiles,” he added.

U.S. Attorney Bill Nettles told lawmakers he was unaware of any assaults by transgender people or people pretending to be the opposite sex in South Carolina bathrooms.

South Carolina Governor Nikki Haley, a Republican, has said the proposed law was unnecessary and unlikely to win legislative approval this year.

North Carolina Republican Governor Pat McCrory on Tuesday tweaked his state’s law with an executive order, adding protections against discrimination for state employees based on sexual orientation and gender identity.

But McCrory and top Republican lawmakers said they would not repeal the measure, despite companies such as PayPal Holdings and Deutsche Bank halting plans to add jobs in the state.

Louisiana Governor John Bel Edwards, a Democrat, on Wednesday signed an anti-discrimination order protecting the rights of gay and transgender state employees and employees of state contractors. Edwards said the order was good for business.