Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Catholic Church teaches that premarital sex, gay marriage, contraception, and divorce are wrong — but a major survey ahead of Pope Francis' trip to the United States finds that much of his American flock does not agree.

The new poll by the Pew Research Center reveals that Americans who identify as Catholic are surprisingly open to non-traditional families, and many don't see birth control, cohabitation, remarriage or gay sex as sins — no matter what the Vatican says.

Much smaller but still significant percentages don't even see abortion — grounds for excommunication under canon law — as a sin.

"This may be in part because Francis' American flock is experiencing life in all its modern complexity," the Pew researchers wrote, noting that a quarter of Catholics have been divorced themselves and almost half have at one point done what used to be called "living in sin."

A Pew Research Survey has taken the pulse of American Catholics ahead of Pope Francis' visit to the United States. EDUARDO MUNOZ / Reuters

The data shows that Catholics who attend Mass weekly are more likely to stick to church teachings than those who only show up occasionally, but even among the very faithful sizable numbers could be seen as "cafeteria Catholics" who pick and choose which tenets to follow.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

On the question of what's a sin, the researchers found:

Cohabitation without marriage : 65 percent say it's not a sin, and 51 percent of regular church-goers.

: 65 percent say it's not a sin, and 51 percent of regular church-goers. Homosexual behavior : 50 percent of all Catholics say it's not a sin, although that dropped to 36 percent among those who attend Mass regularly.

: 50 percent of all Catholics say it's not a sin, although that dropped to 36 percent among those who attend Mass regularly. Contraception : More than three-fourths say it's not a sin, including 63 percent of those who are in the pews every Sunday.

: More than three-fourths say it's not a sin, including 63 percent of those who are in the pews every Sunday. Divorce : Seven out of 10 say it's not a sin; more than half of those who frequently attend services agree.

: Seven out of 10 say it's not a sin; more than half of those who frequently attend services agree. Abortion: A third of Catholics say terminating a pregnancy is not a sin. Among church-going Catholics, one in five don't see abortion as sinful.

While Catholics say the traditional family structure of a husband and wife with kids is ideal, the survey showed that large majorities think it's fine for kids to be raised by other kinds of families: 87 percent are accepting of single parents, 83 percent of unmarried parents who live together or divorced parents, and 66 percent of gay couples with kids.

There is widespread support among American Catholics for change in church teaching, especially on the subject of contraception and allowing priests to marry.

Despite the gap between church teachings and congregants' beliefs, Catholics are clinging to their religious identity: seven out of 10 said they would not leave the church for any reason.

Father Tom Reese, a senior analyst for the National Catholic Reporter, said the "all-or-nothing" approach to Catholicism has been waning since the progressive reforms of Vatican II.

"People are more educated and making up their minds on these issues, not just accepting what father says from the pulpit," he said.

"People now have a lot more personal experience with these things," he added. "They have brothers and sisters and friends who are gay, who are divorced — and they don't want to consign them to hell."

Pope Francis, who is coming to the U.S. later this month, has won fans for a less judgmental approach to Catholic rule-breakers. Just this week, he said priests can absolve women who had abortions, considered a grave sin.

But Reese said Francis' kinder-gentler approach and the liberal attitudes of some American devotees doesn't mean church teaching will be changing anytime soon.

"We have great impatience as Americans. We want things now," he said. "But this pope is trying lead a 1.2 billion-member organization with thousands of bishops from around the world, and he's not simply going to get on his throne and change policy."

Correction: Figures in this story for Catholics who attend Mass regularly have been changed. The figures in an earlier version referred to the views of regular church attendees of all religions.